The developer tools template checks out and I dont get any errors in the UI/File editor…but it also does not work. The trigger never fires. Any help would be appreciated.
And your first template is missing a double quote at the end (which is why all the following text is red, i.e. all of it looks like one long string to home assistant).
Maybe I need to back up and ask for a better strategy.
My thought was that it would be better to have three different options of “turn off after motion stops” all within one automation. Is it generally better to break it up into three separate automatons?
Im trying to migrate from webcore…where I had this in a Switch/Case structure which had a default case. Im trying to learn how to do it effectively here and obviously stumbling.
Switched it to a state trigger. Because you care about no-motion and you’re watching a binary_sensor (which is on or off). 'off' is no motion.
So instead of using a template to surround all your triggers. You use a template in the field that needs templating. Keep in mind, most fields do not accept templates. It just so happens that for, hours, minutes, and seconds do support templates.
The documentation is a little labyrinthine, but generally go for ‘Integrations’ (in the banner above).
There is some very good resources and when you get something you know ‘should’ work … : -
check your yaml spacing (like the Ark it’s two, by two, etc.
consult the docs
use a good editor (many available and different people like different editors. VSC (Visual Studio Code) has yaml plugins (addons) AND HA config addons too (along with rainbow brackets and rainbow spacing it’s saved me hours)
Assuming you have enabled ‘advanced mode’ you will have access to the template editor (Developer Tools - Template) test templates here (this will save even more hours)
search the forum for other peoples problems similar to yours and read (a lot)
Im new to YAML and there is SO much information and documentation to search/sift through. Ive been able to migrate 95% of my automations, but these last few are stretching my newbie brain!
No Worries, We all have to start somewhere.
Most newbies go the Automation Editor (in the GUI) route (The easiest way to go when you haven’t a clue where to start) But it’s fairly new (about 6-8 months old), writes funny looking code and few ‘experienced’ (read boring old farts like me) don’t like it. So support for that is ‘limited’ as it involves a lot of pictures (not good on forum resources) and you can’t cut and paste text to test/offer.
So I’m impressed you have started in at the deep end (with the old farts)
The GUI editor will get better, but it won’t be able to help much when you need a template.
Insert here the template you need : - “Produce Romeo And Juliet with Mercutio’s part rendered in BOLD”
It just ain’t gonna happen
Some here (petro included - but don’t tell him, it may go to his head ) are ‘artists’ at a good template