hass-circadian_lighting icon indicating copy to clipboard operation
hass-circadian_lighting copied to clipboard

Advice on how to pause/suspend CL - feature request?

Open Noodleyman opened this issue 3 years ago • 6 comments

Hopefully I am raising this in the correct place... I've been trying to implement this excellent solution the past couple of days however I can not seem to find a solution to the way in which I want them to operate.

I am only using the lights_brightness feature of CL. I have it setup with one light at the moment and it is working correctly. It has a min/max brightness level defined. It adjusts the brightness over time as expected.

However, what I am trying to do is suspend CL in the case where the brightness is manually adjusted to make it family friendly. In my testing, if we dim the lights, a few minutes later CL may raise that light level. If somebody manually changes the brightness level we want it to remain at that level until the light is switched off/on again.

I've been playing around with the disable_entity/disable_state variables, but haven't found a reliable way to get it to work as it doesn't seem possible to know if a brightness level change was made by CL or something else. If we are adjusting brightness only using Automations then it would be easy to do, however we tend to drill into the light in HA and use the brightness slider.

Is it possible that before making a brightness change, CL can check if the brightness value it last set is still the current value? if it is, it's safe to continue to change the brightness level, if it's changed assume something else changed it and leave it alone

Noodleyman avatar Mar 26 '21 13:03 Noodleyman

Is it possible that before making a brightness change, CL can check if the brightness value it last set is still the current value? if it is, it's safe to continue to change the brightness level, if it's changed assume something else changed it and leave it alone

That's an interesting idea and may work well, however I'll have to figure out a good way to keep track of what the last set value(s) were.

Unfortunately I haven't been able to devote time to this project in quite a while and I'm not sure when that will change. I'll keep this open as an enhancement, however, so that I can tackle it as time allows.

claytonjn avatar Mar 26 '21 18:03 claytonjn

Legend... :) Thanks for taking the time to review the request, I appreciate it.

I assume IF it ever does become a feature, it can be enabled/disabled via a setting. no idea if it's viable, but may be useful to some. we just like our lights to be dimmer in general in the evening, so would like them to auto-adjust over the evening too our pre-set min levels, that all works well, but the only bit we found was the auto-adjustments if you manually adjusted something. pretty close... but no cigar :)

Noodleyman avatar Mar 26 '21 18:03 Noodleyman

Most people using this component want a feature like this. I've solved it by implementing a combination of connected lights with connected light switches, so when a switch dims a light CL is disabled automatically. But it means I can't use voice control or the HA frontend to change brightness at all, without manually turning CL off first.

claytonjn avatar Mar 26 '21 21:03 claytonjn

Came here to look for advice on this exact feature so +1

matthewmmorrow avatar May 06 '21 05:05 matthewmmorrow

Yeah, I set up Alexa routines, so if I say "Alexa, I'm reading" then it turns the living room lights on 100% and turns off CL. Later, "Alexa, I'm done reading" turns on CL again and turns off one lamp that I only ever use when reading.

JaimeZX avatar May 18 '21 11:05 JaimeZX

I think #51 addresses your wishes - the code by mikeage works well for me!

watercrossing avatar Sep 16 '21 08:09 watercrossing