I’ve got an feature idea that would solve many timer (and dismiss timer) use cases.
Currently I’m misusing the
transition: 10 attribute to delay my night light turning off completely. The reason for that, is because I want to 1) turn on for 10 seconds a very dim light in my living room when I enter but 2) only when it’s currently off and it’s dark, and 3) I want to be able to “override” the 10 second timer by for example applying a scene, or turning it on (more brightness) manually.
This can be abstracted into this:
- turn on a light
- start 10s timer*
- turn light off
[*] but also dismiss the timer when literally any other command is given to the light
Manually dismissing such a timer is not trivial, since many triggers could be a valid reason for dismissal. And when using such an automation the number of timer-dismissal -automations lines of code would get out of hand really quickly when you’d want to apply it to multiple lights.
Proposal: a new
turn_on_forthat accepts a number for the amount of seconds after which it turns off, unless the light has recieved any other instruction.
I think this pattern would fix many timer-related use-cases, for people using HA automations but also for people using Node-Red for automation. In my home alone, I would have more than 6 lights I’d apply it to.
What do you think? Is it a crazy idea?