The condition does not have to stay true for the entire for
period because the automation’s conditions are only evaluated when a trigger fires, and in this case, that’s not until input_select.presence_andre_preset
changes to Abwesend
, and stays that way for 24 hours while the trigger is not reset (i.e., the automation stays on and HA continues to run without restarting.)
So the condition only has to be true for when the trigger occurs? That’s even more of a question then why 24h would not work…
Which basically leaves the only option for 23h working and 24h not, that the trigger condition is not being met within that timeframe? does the input_select refresh at some point which causes this phenomena?
Why is that a question? That is simply how automations work. When a trigger fires the condition(s) are tested and must be true at that point for the action(s) to run. Nothing mysterious here.
There are three things that can prevent the trigger from firing (once the entity has changed to the specified state):
- The entity’s state changes to something else before the “for” period has expired.
- The automation is turned off (and possibly turned back on.)
- HA is restarted.
That’s it. It’s just that simple.
And the bottom line is, with homeassistant.core
set to debug
, all the details are in home-assistant.log. There should be no mystery why the automation is not “triggering.”
It is a question, because I did not know that as you could have guessed from my previous posts - I am sorry if I offended you. I am also here to learn.
No offense taken or intended. I was just trying to understand why you said it was a question. It seemed you might be implying that something else wasn’t working correctly. So, sorry, no, I didn’t guess that that was what you meant.
I’ve worked on some of the code behind the questions raised in this topic, so I know how it works, or at least, how it’s supposed to work. If there’s a bug then it would be good to get to the bottom of it. However, it appears the issues are more related to not fully understanding what is happening in the OP’s system, so at the same time I’m trying to provide more insight into how things work (beyond what the docs say) and how to diagnose the issue. Sorry if I sounded demeaning.
No worries, I am thankful for your insight. Learning something new every day
Just to close the loop, the test I set up yesterday completed successfully today. The first automation triggered 23 hours after changing the Input Select, and the second triggered 24 hours after.
Hi Phil, Komadori,
thanks for your help. As written in the beginning, I expected the issue with me and my setup/programming. All works now as expected.
I still dont know what happened and was wrong in the beginning, as I couldnt see issues with the input selects and conditions, but today I could verify that all “for” types work!!!
Thanks again for your extended help and patience. I also learned how automations behave when being enabled/disabled…
The issue was clearly on my side. From my point of view, we can close this thread.
Best regards and again many thanks!!!