My kids are notorious about leaving the laundry light on. I want to set an automation that will turn the light off after it has been turned on for 15 minutes. They are controled by Smart wifi switched that are connected to HA with Tuya set at 30 second polling. This is the settings so far.
Not sure if youâre missing anything, but I had a heck of a time getting mine to work like this for a closet light. No matter what I changed in the UI, it would always turn off on the 15 minute mark of the hour (1:00, 1:15, 1:30, 1:45, 2:00 etc.) But not âAfter 15 minutes elapsed timeâ
I may have gave up - donât remember, will check it out at home.
You can do it as @duceduc suggested above or if you want to use the UI you should probably use a state trigger instead of a device trigger and then set the âforâ option to â00:15:00â.
I donât use the UI editor so Iâm not really sure what âdurationâ means for a device trigger. It seems like it should mean what you want but if itâs not working then itâs either a bug or not intuitive and means something else.
I fiddled with the settings a bit and if I turn it on with HA it works as it should. But if I turn on the switch manually HA doesnât recognize that its on for quite a while. I think the polling with Tuya just takes longer than the setting even though I set it for every 30 seconds it can take up to 5 minutes for it to be recognized.
Did you managed to resolve it? @miguelromao 's approach works at my place, but only when lights are being turned on by pir sensor. When I turn them on manually with light switch, they remain turned on.