I would like to put some automation to send notification when some switches/sensors’ state don’t change for too long (e.g. it’s down for some reasons).
I wander if & how I can create the trigger like this.
I would like to put some automation to send notification when some switches/sensors’ state don’t change for too long (e.g. it’s down for some reasons).
I wander if & how I can create the trigger like this.
I am not sure, because I have not tried it. However, I would try the “Timer” component that starts when a switch is switched. When it is finished, you can use a condition to check if the switch is still true/false.
Hi,
I tried “for:” option but it would require “to:” statement in which can only detect one state.
For MQTT sensor, it can be infinite combination so this is why I tried to check if there are any simple statement to trigger just any state for certain duration.
PS: Timer worked but it would require several modules/automation per component which I also would like to avoid.
you never said this was an MQTT sensor. In this case, yes you’ll have to start a timer when the state changes and when the timer expires, check to see if the state is still the same state as before. Or you could use and template sensor or set an input bool and check the state that way.