I have smart switch Blitzwolf SPH6 with Tasmota 8.1 firmware connected to dishwasher.
My goal is to turn it off after 5 min. if there is power consumption below 5W for 5 minutes. So i wrote automation:
Unfortunatelly if the switch is turned on manually it doesn’t turn off after 5 minutes (I checked history of sensor.gniazdko_kuchnia_zmywarka_energy_power and it shows 1-2W for 5 minutes period and nothing happens - it’s still on, logs don’t show anything). What am I missing or doing wrong?
I don’t understand this line. I tried to find a sensor which shows how long the switch is on but I’ve not found it. Is it a template sensor? - it still doesn’t work if my code looks like that:
This is just checking that HA has been online for at least 2 mins before this automation can run - protects against 0 values when HA is restarting and possibly triggering the automation to run.
Are you sure your switch value is staying under 5 constantly for 5 mins? I have found that some appliances of mine, dryer, dishwasher etc, can have little spikes sometimes that cause the value to jump and not stay below the threshold for the time it takes to trigger the automation.