danobot / entity-controller

Home Assistant Entity and lighting controller for managing devices with timers, scripts, and sun-based time restrictions.
https://danobot.github.io/ec-docs/
GNU General Public License v3.0
299 stars 40 forks source link

stay_on: {state_entity} or blocking turning off the light on the state of the entity #301

Open Aldaran opened 1 year ago

Aldaran commented 1 year ago

Hello. Everything is working. But what is missing is the ability to block the light from turning off if some condition does not match the value 'on', for example, input_boolean.autoswitch_off_light. That is, so that the light turns on in normal mode, but does not turn off if {input_boolean.autoswitch_off_light} is on, as when working with stay_mode. Perhaps it is worth refining this function so that it is possible not only to specify 'stay_mode: on', but to check the state of some entity, similar to:

stay_mode: input_boolean.autoswitch_off_light

Then the light will be turned on, but you will need to turn it off either manually or by changing the stay_mode state.