I have 4 temperatures sensor (sensor.temp1, sensor.temp2, sensor.temp3, sensor.temp4) and, if i restart the service, for example, they start with state ‘unknown’. I want to build an automation that check this states and if they’re with state = unknown, run a script (that I already have and works fine) script.update_sensors.
I’ve been struggling for a few hours trying to come up with an automation but nothing worked.
I considered an Automation because I need something that will keep checking for the state and, if it goes to unknown, then it will do an action. If I build a script, it will only work when I manually trigger it… right?
Yeah, that’s what I want: something that check for a condition all the time and, if is true (in this case, sensor state = ‘unknown’) it runs a script (script.update_sensors).