basnijholt / adaptive-lighting

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

take_over_control doesn't work anymore #377

Closed FPF92 closed 1 year ago

FPF92 commented 1 year ago

Version information:

1.2.1

Description:

When i change the brightness and / or color temperature of my lights that are setup in adaptive light these parameters fallback after seconds.

I turned on the option: take_over_control: If anything but Adaptive Lighting calls 'light.turn_on' when a light is already on, stop adapting that light until it (or the switch) toggles off -> on.

I assume it started after the update to version 1.2.x because in the past it worked fine.

michaelsleen commented 1 year ago

I have the same issue, at least with brightness, in addition to lights now randomly turning on. The inability to use take_over_control has persisted for as long as I can remember, whereas lights turning on randomly is a new issue. I have Philips Hue lights connected to a Hue hub, and I manually control them using a Lutron Aurora Smart Bulb Dimmer Switch (for adjusting the brightness, and turning on and off). Take_over_control and detect_non_ha_changes have always been enabled. Really hoping there is a solution, especially for take_over_control for manual brightness changes.

Gerben321 commented 1 year ago

Same here. Also random lights turning back on. New install for two days now. If it keeps happening I'll remove it for a while until it's fixed. Great potential!

robvangeloven commented 1 year ago

The lights turning on randomly seems to be linked to an adaptive lighting timer not being reset / stopped after manually turning off a device, at least for me.

djcrawleravp commented 1 year ago

I can't turn off my lights, after a couple of seconds the lights go on again

mlangenberg commented 1 year ago

Just switched from hass-circadian_lighting to adaptive-lighting, because I needed something that would automatically override the adaptive lighting when manually adjusting the brightness from the home assistant user interface.

I can confirm that enabling take_over_control does not do anything at the moment using version v1.4.1.

ChipWolf commented 1 year ago

Also confirming, not seeing any adaptive_control.manual_control events either, but the state changed events are coming through from the non_ha changes

brebtatv commented 1 year ago

I have identified the problem. If the "interval" setting is longer (seconds) than the "transition" or "sleep_transition" duration, the manual_control switch will not have time to set to true or to the given lights. The manual mode is thus not activated.

But if we set the "interval" to a time shorter than "transition" and "sleep_transition", then manual_control has time to write and the manual mode is already functional.

Nattfisk commented 1 year ago

I have identified the problem. If the "interval" setting is longer (seconds) than the "transition" or "sleep_transition" duration, the manual_control switch will not have time to set to true or to the given lights. The manual mode is thus not activated.

But if we set the "interval" to a time shorter than "transition" and "sleep_transition", then manual_control has time to write and the manual mode is already functional.

THANK YOU!

I have been so annoyed by this issue, disabled the feature some time ago and have been trying to come up with some kind of workaround because i really wanted it to work. Adjusted the timings and everything works again. This made my day :)

djcrawleravp commented 1 year ago

I have identified the problem. If the "interval" setting is longer (seconds) than the "transition" or "sleep_transition" duration, the manual_control switch will not have time to set to true or to the given lights. The manual mode is thus not activated.

But if we set the "interval" to a time shorter than "transition" and "sleep_transition", then manual_control has time to write and the manual mode is already functional.

Sorry can you post a screenshot of the parameters you have changed?

THanks in advance!

basnijholt commented 1 year ago

If the "interval" setting is longer (seconds) than the "transition" or "sleep_transition" duration, the manual_control switch will not have time to set to true or to the given lights. The manual mode is thus not activated.

This should be easily fixable in the code too. Just need to find some time ;)

basnijholt commented 1 year ago

I made the appropriate change here: https://github.com/basnijholt/adaptive-lighting/pull/417

If someone could test it, it would be great.

djcrawleravp commented 1 year ago

Hello guys, I've tested the lights again but the problem still persist.

The light and lightgroups are turning on after a couple of seconds of turningh them off manually

Steini1984 commented 1 year ago

Hello guys, I've tested the lights again but the problem still persist.

The light and lightgroups are turning on after a couple of seconds of turningh them off manually

I can confirm that this is also happening to me. Using Zigbee2mqtt with ikea Tradfri lights in a zigbee group and (at least) this is happening when turning the lights off manually via a wall switch that is directly bound to the lights.

Here are my settings: image

DaveNankervis commented 1 year ago

I have identified the problem. If the "interval" setting is longer (seconds) than the "transition" or "sleep_transition" duration, the manual_control switch will not have time to set to true or to the given lights. The manual mode is thus not activated.

But if we set the "interval" to a time shorter than "transition" and "sleep_transition", then manual_control has time to write and the manual mode is already functional.

After updating the full example to have transition: 120 leaving the interval: 90 this seems to have fixed this issue for me.

th3w1zard1 commented 1 year ago

Fixed in version 1.10.0