New Adaptive Lighting Integration

I tested with group of 3 ZHA lights in office turning them off as a group with transition:5 and light_2 would still show on while light_1 and light_3 would show off after the transition had finished.

I’ve updated home-assistant/core issue #48534

I am, but I’m not. My setup may be a little unique.

My fan fixture has 4 z-wave bulbs in it. They’re controlled by a dimmer on the wall via z-wave association. All of my z-wave devices are connected to a hubitat hub and then exposed to HA through the hubitat custom component. So these 4 bulbs are in a group, but that group is on hubitat. HA sees just a single entity light.living_room_bulbs. So yes, they’re in a group but not grouped in HA.

That’s not to say the state may not be sticking like you’re seeing with yours. I will keep an eye on it and see what I find.

Yes, it will definitely be interesting to see what the individual bulb states show in hubitat as well as the state of the group in hubitat/HA after you’ve turned them off to go to bed and before they’ve turned themselves back on. Perhaps your group in HA is NOT showing off. I think we’ve all been assuming that when the bulb(s)/group is/are physically off that the automaton platform state matches the bulb’s actual state.

Very nice Lighting!

I added a Automation to toggle “sleep mode” at 22.00 and 7.00. is it possible to have these in the interface too? id really like to have a transition time to sleep mode too (30 minutes would be great) like the f.lux app for PC has.

and one last question: is it possible to have a switch for the “prefer_rgb_color, use ‘rgb_color’ over ‘color_temp’ when possible” flag? In the evening this gives me a much warmer/more reddish color, but in the morning removing this gives me a nicer wakeup/learn/work light.

great job! :slight_smile: one of the best integrations i found as a home assistant noob so far :slight_smile:

2 Likes

I finally got around to testing this with a z-wave dimmer. I was hoping that adjusting the dimmer with the manual control would trigger the take_over_control and disable Adaptive Lighting, but it doesn’t.

You should address your issue to @basnijholt

U lights are now turning on automatically in the matter of a minute after turning them off. Those would happen during the night but now it happens also during the day. Pretty annoying unfortunately.

This integration doesn’t turn lights on or off. There must be some other automation / service causing that behaviour.

AL is the automation that is turning the light(s) back on but through no fault of its own. The underlying issue is that HA is not correctly seeing/registering all entities as off when they are within a group that is turned off with a transition. Thus when AL cycles, it sees the entity as on and adapts its brightness thus turning on the light(s) that was/were physically off.

Where you have lights coming back on, go check the HA state of the entities in HA after you’ve turned them off and you will see that the ones coming back on show on in HA even though the bulb is off.

I tested this from within HA with AL, Magic Areas, Automations disabled and I could reproduce the cause. Turn the group on/off with no transition and the individual entities correctly reflect the current state of the bulb(s). Use a transition and random members of the group would briefly show off in HA and then change back to on even though the bulb was off. Sine AL looks to HA for the correct state of the bulb, it thinks the bulb is on and adjusts it causing it to turn back on

I have removed my office and bedroom light groups and am now controlling the entities individually with transitions and have not had any turn back on.

1 Like

I opened an issue on github but there is no activity yet…

I use Hue light group in the integration. You can see from the log the group turning on automatically.
The turn in happened after 5 seconds.

Turned on by state_changed
11:29:48 AM - 21 hours ago
Turned off
11:29:43 AM - 21 hours ago

@dbrunt is saying: don’t use groups of lights in the Adaptive Lighting integration, that is causing your problem.
Instead use a list of single light entities.

This can unfortunately cause lag in turning many bulbs at the same time. Turning on the group will send only one command from the bridge to the lights.

Can you watch the state of the group &/or lights in HA while you turn them off?

Yes. Do you want to check anything specific? I can see them turn on or off immediately in the UI when I press my Deconz controled Ikea button.

Are they part of a group?
Are you using a transition when turning off?
Does each member of the group show off in HA?
Are all of them coming back on?

What I was seeing when turning off a group of three lights with a transition was in HA one of the states would flip back on causing the group to show as on with two members showing off. Physically, all bulbs had turned off. That state in HA would trigger AL to adapt the ON entity/group thus causing the bulbs to physically turn on.

Can someone explain the ‘take back control’ element of Adaptive Lighting to me? As far as I understand Adaptive Lighting doesn’t turn on lights by itself, it just adapts the colour/brightness. So surely every time a light is turn on it is done outside of the integration and will trigger ‘take back control’ (if the option is switched on).
Or is there some switch or service where you can turn on a light via adaptive lighting?
Edit: Oh I think I get it. Take back control only works if a manual change to a light is made when a light is already on… Neat.

Also, has anyone done this with Ikea bulbs? They appear to have a warmth range of 250-454 (edit: are these mireds?). How does that translate to Kelvins? Does Adaptive Lighting automatically do the translation?

I have not used Ikea bulbs but the conversion formula between mireds and kelvin is 1,000,000 / mireds = kelvin and 1,000,000 / kelvin = mireds. HA does the conversion under the hood since you can use either value in light.turn_on (color_temp or kelvin).

Great, thanks

My understanding is that ‘take back control’ means that if a light is switched on from a means outside of HA (ie: a wall switch on a zwave dimmer) then Adaptive Lighting is supposed to turn off the switch.adaptive_lighting for that device such that any manual dimming is not overridden by HA / AL. Unfortunately I haven’t had success yet as it seems not to work with my zwave dimmers.