trigger (at a specific time)
condition (if a specific state is true)
action (do things).
it works well except it happened that the state checked in the condition was unavailable and the automation of course didn’t run. so I’m looking for a fix to that.
My idea is to have a condition such as:
if state is available (i.e. not unavailable)
then check if it's true
else
start a loop to check every 2 minutes if the state is still unavailable.
as soon as the state becomes available then the else is not executed anymore thus everything should be working fine.
I’m not able to implement the else block though, I’m currently using te UI.
Recommend reading the docs — conditions are an AND:
This
triggers at 06:40; also triggers when your calendar changes to the correct state
checks it’s after 06:40 AND the calendar is in the correct state
if the checks pass, run the action.
In other words, the action runs when both criteria are correct, at the point that the second one becomes correct.
In general, if your automation has timed “polling” loops in it, you’re not doing it the best way. As always, there are exceptions, but this isn’t one of them.
If the issue is the difference between false and unavailable, you can check those individually too. Describe the logic you want to use.