I am starting to get the hang of HA configuration, I found the documentation for components along with folks on this forum to be pretty helpful once you do enough digging. But for automations I am not sure what I can do. It limits the imagination on what I can automate if I don’t know what the rules are capable of doing.
Are the rules based on any particular rule based language I can read up on?
Are there outside sources of documentation on rules? I found the rules documentation on the HA site to be mostly examples. On the forum it’s mostly questions about a specific rule. I find this more of a give a man a fish method instead of the preferred teach a man how to fish.
For example I am not sure how to write a rule to so something if a particular state exists for more than X amount of time and repeat every Y min. Specific examples, Send Notification if Garage left open for more than 30min and repeat every hour OR Send notification if a sensor had detected an issue like high power utilization and repeat if condition continues.
I see two ways to do the power notification. Either trigger on state change of power meter (since it tends to fluctuate enough to send updates) or a time trigger every 30 min check the power state. I am not sure which is better.
I find this more of a give a man a fish method instead of the preferred teach a man how to fish.
If you need help on automations, just ask for support and learn from it instead of flaming the docs. There are many people willing to offer help, or use this
@petro thanks I found those docs and they were helpful for easy stuff but now I would like a deeper understanding.
@sjee sorry I seem to have upset you with my post. I am really just looking to learn. I didn’t mean to flame the docs. I find them very helpful. I just didn’t see a lot of depth in them so was wondering if that was because they use a common language I should research. For example configuration was really confusing to me until I read up more on yaml syntax. I will post one of my more complex automations but I wanted to start by asking what I needed to learn first. I know this community likes you to do your homework before asking silly questions so I was just asking for a homework assignment
I don’t think @sjee was upset about your post. I just think he’s letting you know that google is your best resource here. And he is 100% correct. This is an open source platform, the best resource by far is this forum. The problem with the forum is that the search engine sucks. I always back out to google and search from there using the site:home-assistant.io as a filter.
@petro OK I assure you I use google. I am a software developer with 25+ years experience. I googled searching for documentation on the rules allowed in automations and didn’t find that much. I do agree 100% that the search tool is not best approach. But that is common to most forums. I have been an active SmartThings developer and I am moving over to HA. So far I am really liking it. I am impressed with the speed which is the best part of all local no cloud.
I am assuming for these two responses that there is not documented language in use for rules so I will start digging into specific examples, search using google and ask when I can solve myself.
Yeah, I think you may be overthinking the ‘rules’ portion of this. Anything you can dream up can be done in HA, there are very few cases that cannot be done. Everything in regards to rules is covered in those 3 links I post.
This isn’t like smart things where you have to import ‘new rules’ to get extra functionality. The functionality is already here in home assistant, you just need to ‘code it out’ with yaml configurations and templating. Google Jinja2 for the templating syntax. And Templating is covered here:
Just be aware that templating is only allowed in certian places. These places are typically denoted with an _template: in the name.
If you don’t like making automations with yaml and templating, use appdaemon and code with python. Or you can create your own custom components, but you’d still need to use yaml in that case.
@petro Thanks, that is very helpful. I was planning on looking into appdaemon after I try the built in rules. I don’t mind the yaml syntax. Seems easy enough to me. I am my a python programmer so learning curve there a little. Just about every other language but not python