Obviously this should alert when the alarm “ready” state switches to “true”. However, this automation never runs. No matter what I do, it never seems to alert and so clearly I am doing something wrong. I am at a loss as dev tools clearly show the attributes two states as “true” and “false”.
I created the automation using the gui and this is the output from “edit in yaml” from the gui editor. I believe that it hides the id. I can pull the complete data from automations.yaml if that would be helpful.
As an experiment, remove the lines related to for and to. Repeat your test. If it triggers and you receive a notification then we know the issue is caused by how Home Assistant is interpreting true. It’s possible that there’s some confusion in whether it’s being handled as a string or boolean.
No dumb question. I know about the automation never runs because I saw the last run time as multiple days ago and, I know that a trigger condition happened today.
Actually, without a to or from, it will trigger for any change in the attribute’s value.
The purpose of the experiment was simply to confirm that the value true is being misinterpreted.
Put this back in and see if it still works. Note that there are no quotes wrapping true. If the Automation Editor automatically adds them then the experiment will prove nothing. You may need to edit it in YAML mode to ensure true has no quotes.
to: true
for: '00:00:10'
The theory here is that the attribute’s value is a booleantrue but the trigger’s to: 'true' is looking for a stringtrue. We want the trigger to look for a boolean true.
Yes! That worked. I think that the problem is that the GUI wants to wrap the true in quotes and so it converts it to text and so is always false. Manually editing in yaml fixes this, but I think that it will be broken again if I open it in the GUI.
You should know that the Automation Editor is like training wheels on a bicycle. It’s helpful initially but, after your skill level increases, it tends to get in your way.
The Automation Editor has several quirks and one of the more irksome is its insistence to format YAML according to its own inflexible set of rules. Wait until you see what it does to complex, multiline templates. Consider it an easy introduction to composing automations but merely a stepping stone to using a text editor that permits far more flexibility.
Thank you again. Out of curiosity, what tool do you use to edit automations? Obvious, I have HA file editor, but I am wondering if you use a 3rd party option like VSCode.