by BrandoElFollito · 6y ago · 0 comments
Have you considered AppDaemon for automations? https://appdaemon.readthedocs.io
I tried to use the YAML based solutions but YAML is not done for that and anything more complicated is not doable (or at least without a super-complex code) - this is usually a few line sin Python in AD.
I would love to be able to use the presence automations but my wife ad children, for reasons that are beyond my understanding, sometimes switch off the wifi to use their data plan. The GPS tracking was draining the battery too much last time I tried (but I have to try again).
(As I recall, it's JSON with lots of long numeric IDs for each node, semantic data also mixed with presentational - coordinates for how you laid it out in the visual editor, etc.)
I know what git is, so I can already `git commit -a -m 'Updated nodes'` if that's what I wanted, but it isn't, I want logical diffs that show me what I did and why; not spurious ID changes because I accidentally moved a node visually a millimetre or two.
It's not git-friendly though, no easy way of versioning stuff really.
https://github.com/custom-components/pyscript https://hacs-pyscript.readthedocs.io/en/stable/tutorial.html...
This is a great software, bit it is really distinct from HA and simple automations require quite a bit of code anyway.
I was thinking about having a mixed mode: the very simple automations (covers up at 9:00) would go into the YAML and more complicated would use the Python scripting described here: https://www.home-assistant.io/integrations/python_script/ (also from automations, but the real work would be done in the script)
Now I see with your comment that there is a HACS component as well - have you compared both and chose one of them for some specific reason?
It looks like a very good solution for more complicated automation (and for simple ones as well, it is just two lines)
I'm more interested in getting rid of IFTTT/Zapier/way-too-messy-Python-scripts, but that'll probably wait until winter holidays.
Sometimes (usually) this is a toggle, sometimes a on, sometimes an off, sometimes something else.
This is easy to do in Python (the list if kept as a dict with actions, there are three lines, one for each action), but gets very verbose with YAML.