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.
I had the same problem and ended up using an automation to just switch the adaptive lighting off for those lights when I don’t need it. Both the manual control and the ‘take control’ options don’t seem to work when I’m turning lights on or off.
This is not the solution, even though I use in AL only single light instances, I still controll via Hue some light features, and we are back again at this issue
Is it just me or does anyone else have a yaml configuration error when attempting to use adaptive_lighting.apply within a script?
The following adaptive lighting yaml block (which I hope to replace the commented out section), gives me the resulting error message:
script:
opple_famrm_3_single:
sequence:
- service: adaptive_lighting.apply
entity_id: switch.adaptive_lighting_adaptivelights
lights: light.family_room_lamp
adapt_brightness: no
turn_on_lights: yes
# - service: light.turn_on
# entity_id: light.family_room_lamp
# data_template:
# color_temp: >
# {% if is_state("sensor.period_of_day", "day") %}
# 153
# {% else %}
# 407
# {% endif %}
# brightness: 255
ERROR:homeassistant.config:Invalid config for [script]: [lights] is an invalid option for [script]. Check: script->sequence->0->lights. (See ?, line ?).
If I manually call the service, it turns on the light as expected:
TIA
Try formatting your script the same as the service call…
service: adaptive_lighting.apply
data:
entity_id: switch.adaptive_lighting_default
lights: light.bedroom_ceiling
transition: 10
adapt_brightness: true
adapt_color: true
oh blimey, can’t believe I didn’t spot that.
Thanks Daniel.
The issue is not Adaptive Lighting. It only adapts what it sees as on
in HA.
What I have found is that even though the lights are physically off, they are incorrectly on
in HA.
The problem is outside of AL somewhere in HA and its add-ons/integrations. There is nothing AL can do about that…
NP! I like fixing the easy ones!!
It seems this integration is broken on HA 2021.5 that just got released.
Would someone mind checking if my understanding of the following configuration is correct or not please?
My plan was to manually switch on a light to the correct colour temperature for that time of the day, at 100% brightness (no matter what time of day), and have it automatically adjust the temperature throughout the day, going no warmer than a specified max_color_temp
of 4500, without adjusting brightness.
adaptive_lighting:
- name: huelamps
max_color_temp: 4500
take_over_control: false
min_brightness: 100
initial_transition: 1
script:
opple_famrm_3_single:
sequence:
opple_famrm_3_single:
sequence:
- service: adaptive_lighting.apply
entity_id: switch.adaptive_lighting_huelamps
data:
lights: light.family_room_lamp
adapt_brightness: yes
turn_on_lights: yes
transition: 1
Unfortunately though the above configuration starts dimming the light and changing color_temp to the max_mireds value of 500 at some point during the evening, which isn’t what I was hoping for.
Have I perhaps misunderstood what this integration can do?
Have you tried:
turn_on_lights: false # I am not sure what this actually does
adapt_brightness: false # You have `yes`
adapt_color_temp: true # This might be necessary for your scenario!
Hi Daniel, thanks for the suggestions.
I did wonder for a moment why I had used yes
instead of true
. I had tested this out within Developer Tools → Services and it didn’t complain when yes
was used, so I guess both options must work in HA.
During that testing, I found I had to set adapt_brightness:
to true/yes so that if the light was dimmed, it would turn on to full brightness when pressing the on switch, so I’ll leave this as True
for now.
I’ve been doing some more tests and have made two changes that I hope will work.
To stop the light dimming, I have manually turned off the switch.adaptive_lighting_adapt_brightness_huelamps
switch as I suspect/hope this was the culprit that adjusted my lamp brightness.
The other is due to realising I’d set max_color_temp: 4500
incorrectly. To prevent it going too warm, I should have set this instead: min_color_temp: 2500
as the guide says:
min_color_temp integer (optional, default: 2000)
The warmest color temperature to set the lights to, in Kelvin.
I’ll see how this plays out and will report back on here.
Still seems broken for me on 2021.5.2, anyone else?
What is broken? For me, everything works fine on 2021.5.
Ensure you are running the latest version of AL - 41d149d. It’s working for me.