I have installed a ‘smart’ floodlight, that I am switching with a Sonoff Mini. The floodlight automatically goes back into its setup mode if its switched on & off for less than 7 seconds, its very annoying.
I want to know if there is a way to create an entity that I could use to control the Sonoff to stop this from happening, ie delay turning on or off if it was used less than 7 secs ago. I would like this as an entity as the outside lights get controlled in several ways, and if I have a new entity I can use it everywhere, automations, node-red, lovelave etc
How will users interact with the floodlight? Exclusively via Home Assistant’s UI?
If there’s no physical means of a user controlling the floodlight and it will controllable exclusively via Home Assistant’s UI then this allows for some measure of control to prevent it from being turned off before 7 seconds.
If when you say its controllable “in several ways” and one of those ways is via a physical switch, then I don’t see a way of using Home Assistant to prevent the floodlight from being turned off before 7 seconds.
Could build a switch template for it and set the ‘off’ as a script with an embedded template delay that ensures it waits 7 seconds. (now() - last_changed) calculation or similar.
Agree that if it’s a physical switch w/ direct control of the light and bypasses HA, not going to help w/ that use-case.
Yes, always through home assistant. The switch is a smart switch, that connects through home assistant to trigger the Sonoff mini, there’s no direct wiring.
Thanks all for the input, it’s all much appreciated. I’ll look into this over the next couple of days. I’ll take a deeper look at the different approaches.
I haven’t used a wait template in the past, but doesn’t it just wait until it’s been 7 seconds in your example?
Trying to understand why your time out is set to 10 seconds
Forgive me if I’m misunderstanding, but seems that in your example, the timeout should be set to all zeros versus waiting an additional 10 seconds after the switch has been turned off or at least seven seconds.