this post was submitted on 04 Jul 2023
5 points (100.0% liked)

Pyscript: Python Scripting for Home Assistant

96 readers
1 users here now

Community for https://github.com/custom-components/pyscript

founded 1 year ago
MODERATORS
5
Pyscript appreciation post (self.pyscript_ha)
submitted 1 year ago* (last edited 1 year ago) by ALERT to c/pyscript_ha
 

As an initial post, I just wanted to say that Pyscript changed my whole usage of Home Assistant. I don't even use the built-in automations: everything is performed by Pyscript. Without it, I would dump 90% of my automation ideas due to the clunky automation interface and YAML clunkiness.

If you are too humble to post at the Pyscript GitHub Discussions, please post your questions here!

you are viewing a single comment's thread
view the rest of the comments
[–] ALERT 2 points 1 year ago (1 children)

I doubt there is. We can make this place such :)

[–] Beartotem 1 points 1 year ago* (last edited 1 year ago) (1 children)

I've got literaly nothing to share =(

I have to make an automation system to control my house's heating, but I have yet to find the time... I looked a bit at the doc of pyscript, and i do think it's the best tool available for that.

[–] ALERT 1 points 1 year ago (1 children)

As my air conditioner bases its fan control on its own thermometer, and its readings are irrelevant, as it is positioned on the AC itself, I made an AC automation using Pyscript that manages the AC modes, temperatures, and boost based on an external thermometer :)

[–] Beartotem 1 points 1 year ago* (last edited 1 year ago)

Sounds neat. So long as that external thermometer is not too close to the cold air stream, its bound to give better readings than the built in one.

What i'm looking to build is a system that integrates automatic temperature adjustements for winter time variable rates and presence detection. The horrible crap I have made with the basic yaml automation ignore each other, which lead to wrong behavior in some (common) situations. I could solve it with an extra state variable, but it would still be full of duplicate of hardcoded values in the two automations...

I'm unsure how to organise my pyscript code to meet my goal in a clean and extensible way. I wish i could take a look at someone else's work.