-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep manual lights manual when changing sleep mode #1060
Comments
Hi there,
In case of 1 it might be difficult to retain manual mode after going into sleep mode for a light. It would have to save the light settings of before it went into sleep mode? Or retain the setting of sleep mode itself? Also, how would you control the light while it's in sleep mode? |
Hello 👋 In my case my bedroom light is set to Adapting, so whenever I turn it on, it will have the ideal color and brightness. It is also set to the default When my wake-up routine starts, it sends a command to transition from 1% red to 100% 4000K over 900 seconds. This works perfectly fine, and is seen as control being taken over, so AL does not interfere. However, if during that time the sleep mode of the AL switch where my bedroom light changes (in this case goes off), the control that was taken over is reset and it starts adapting the light again, canceling the transition. This does not make sense to me, as manual control means manual control, whatever AL decides it should be because it's noon, evening, sleep time, whatever, I've "taken over control", leave it be, as explained in the docs. I can circumvent this by disabling the AL switch before the wake-up routine, but then I would need to turn it on again at some point in the future. Not after the routine, as the wake up light needs to stay bright until I decide to roll out of bed. Another example is if one room decides to stay up later with a "taken over" reading light setting, but sleep mode is turned on because it's, well, sleep time. Then that light would need to be turned to sleep mode after being turned off, requiring more logic for that button as well. What would make much more sense to me is that sleep mode does not interfere with manual mode. If someone does need sleep mode to reset manual control, that just takes a single action call, in that single sleep-mode enabler routine, which targets all AL switches and removes sleep mode. Groetjes terug |
Hi there,
Does that capture your case? If so, you could consider setting the Other route would be to change AL and have it not leave Not sure if this helps? |
I realize I've not been clear in that I've already implemented a workaround, but that is far from satisfactory as it adds lots of complication. As you may notice in your proposals is that these are all quite complicated and if circumstances change, would need more maintenance. So for now I've just removed the mentioned line from my installation, and things are working beautifully and simple now. As I still find the behavior strange (and undocumented) I've created a PR in #1063 |
adaptive-lighting/custom_components/adaptive_lighting/switch.py
Line 1564 in ccf4652
This line here causes my wake-up light transition to fail after 5 minutes because it starts at 6:55 and I've set the sleep mode to turn off at 7:00.
Undesired alternatives
You could say I should then move the wake-up light or sleep mode time, however this time may change at some point, causing overlap once more. More so as I have a housemate with a different routine. Finally because the wake-up light starts before I stopped my own "sleep mode" :-)
Another option would be to not disable sleep mode when in a wake-up transition, but that's more complexity and management to make sure sleep mode gets disabled later.
A better way
My main point is I find it counterintuitive to reset manual mode when toggling sleep mode, as to me those two are unrelated. Sleep mode I assume to be part of adapting lights, so if light adaptation is disabled for some reason, there should also not be any sleep adaptation.
Furthermore, it's quite a lot easier to do this yourself in an automation, as there's a service call to reset manual mode for all switches whenever some automation enables or disables sleep mode. It's much more complex to manage the state of manual mode when sleep mode switches, and having to reset it yourself, more so after the sleep mode has already sent some command to transition the light to sleep colors.
Making everybody happy would probably be to have some configuration switch for this.
WDYT?
The text was updated successfully, but these errors were encountered: