basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.77k stars 131 forks source link

"only_once" not respected by "Sleep switch". #737

Open maxi1134 opened 1 year ago

maxi1134 commented 1 year ago

When lights are already on, they seem to turn to the sleep settings when the sleep mode switch is turned on.

I would expect lights to stay in their current state and only go to sleep mode after being turned off and on again.

Is this achievable in any way?

basnijholt commented 1 year ago

This is actually by design.

Setting these all have the same effect:

It would be much more difficult to implement tracking only_once in all cases.

maxi1134 commented 1 year ago

Would there not be a way for the "to sleep settings" action call on the bulbs check that they are not on?

basnijholt commented 1 year ago

Yes, that is possible, however, I would need to implement it in a way that it is configurable because I do not want to change the current behavior (which people rely on).

Currently, I do not find it worth the trouble given the exploding number of configuration options.

What is your use-case if I might ask? 😄

maxi1134 commented 1 year ago

My use-case is very specific, so probably won't apply to much, but here I go;

I host events very regularly in my house, events where the lights have saturated colors.

I would like to enable the "Sleep mode" when the main users or the house are asleep ( Partners and Squatters ), while keeping the lights that are still on in their original color until that room is emptied by the remaining guests, turning to a "sleep mode" color when motion is re-detected ( This will incentivize the guests to remain in the already occupied rooms and slowly make more and more rooms darker. )

My goal will all of this is to automate the programmed death of the party, where people are cordially pushed out by automated means.

basnijholt commented 1 year ago

Sounds like a cool use case.

I might be able to implement only_once differently where it marks a light as manually_control. Then I could provide an option where one selects how manually control is reset. However, it might be a while until I find the time for this.

maxi1134 commented 1 year ago

Sounds like a cool use case.

I might be able to implement only_once differently where it marks a light as manually_control. Then I could provide an option where one selects how manually control is reset. However, it might be a while until I find the time for this.

I'm a patient person!