#Not condition time

1 messages · Page 1 of 1 (latest)

sacred vessel
#

Hello!
Is there a way to have an automation condition that’s:
„Only do the automation if a entity wasn’t unavailable for the last 10s“

I have the Not condition and I can set unavailable but I can only set it to have for x time, but I would need something like „inside the last 10s“.

oak compass
#

You can't do that because that information is not in the state machine.

#

You can do it if you make a template binary sensor of that condition.

pallid cedar
#

Honestly, I think the easiest way would be to have a little binary sensor template that just reads {{ has_value('sensor.mysensor') }} and then check the state of that is true for 10s

sacred vessel
#

I did it differently: I run an automation with a trigger „entity unavailable“ and set a helper to true, it gets reset when the device is available again, this helper can than be used as a condition of a automation