New Adaptive Lighting Integration

Z-Wave dimmers in the wall at the normal location you have the light switch. I can turn them on/off via HA or via a pushbutton wired to the dimmer itself

Do the dimmers not report their status change back to HA?

They do, but that’s the point. Using this new Adaptive Lighting (AL) component will allow HA to disable AL if the light has been controlled externally to HA, ie: the command to change the light was not a HA service call, but someone changing the light using the dimmer button. This functionality is not currently possible with CL as there is no tracking of why or how the light has changed from the CL settings

That’s good to know, thanks! I learn something new about HA every day…

Glad that @adamoberley recommended this to me. Got it up and running on my instance, and it’s running beautifully.

Though I’m still new to Home Assistant and would be curious if one might know of a way to have different settings depending on a variable, such as sunset.

For example:
I would like to have Adaptive Lighting control brightness and color during the day, but perhaps only color at night. While the configuration variables allow for those settings to be adjusted, I’m not entirely sure how to separate the behavior into different times of day. Any advice would be great!

Maybe with an aditional automation like that:?

alias: AL Brighness Autoamtion
description: ''
trigger:
  - platform: state
    entity_id: sun.sun
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: sun.sun
            state: above_horizon
        sequence:
          - service: switch.turn_on
            data: {}
            entity_id: switch.adaptive_lighting_adapt_brightness_buro_deckenlampe
      - conditions:
          - condition: state
            entity_id: sun.sun
            state: below_horizon
        sequence:
          - service: switch.turn_off
            data: {}
            entity_id: switch.adaptive_lighting_adapt_brightness_buro_deckenlampe
    default: []
mode: single

This turns on Brightness Adaption of AL when Sun goes above horizon and turns it off when sun goes below horizon

I thought this was going to be released with HA 0.118 but I guess that didn’t happen… any idea when it will be released as a core integration?

1 Like

Maybe i do not understand the real goal of this component. What i need is an adaptive lighting from sunset to sunrise and not the opposite as i don’t need to have lights turned on during the day, living in a place where the sun is really powerfull. Is there a way to have this component working following my needs? Or surely i did not understand at all?

Short answer: Yes.

Adaptive Lighting is 24x7 but very controllable. If you don’t turn on the lights during the day (or night), nothing happens. It does not turn lights on or off, only adjusts the brightness/color temp if they are on, and only the ones that you specify in each entity of Adaptive lighting that you create. I have three…Bedroom, Bathroom and Office, each with different settings. You could create automations to disable/enable any of the following aspects of each: Disable/Enable the AL entity, Brightness, Color or Sleep Mode. Sleep mode is controlled by input_boolean.sleep_mode that you have to create. I have Alexa toggle it when I say Good Night/Good Morning.

How to create more than one series of switches. Actually i have created, using the UI, only one series of switches, but if i want to create another one for different lights in a different room, how to do this?
Sorry if this is a stupid question but i am not so good in translating english documentations…
EDIT: Found it! Forget my request…

No such thing as stupid questions, only stupid answers, like RTFM, etc.!

For thread question/answer documentation, the answer is: add another instance of the integration.

I hate when I’m googling something, find the same question I have and after reading 8 or 10 pages of back and forth the poster says “I manged to fix it…”. Someone might ask how but they never answer!

Hi! I’m pretty excited for this integration as it fixes some niggles i had with the existing Circadian integration.

I’m wondering what the best way of doing a slow transition fade for automatic lights on would be. For clarity, what I do is have automatic lights turn on at sunset on an offset so they fade in over half an hour or an hour or so.

One major issue I had with CL was that I’d have to disable the switch for circadian whenever i wanted to transition lights. it was… kinda messy and gross. This method seems better as you can just call it for individual lights.

I’ve put together a super quick and dirty script i can call with automations that will set manual control for the lights that are being transitioned and wondered if anyone had a better method? Ideally, I’d like the lights to slowly transition to on at the correct colour temp for that time of day, and then have the adaptive lighting controls kick back off so that they change as it gets darker.

Here’s my script I’ve made. It seems to work pretty well.

 sequence:
   - service: adaptive_lighting.set_manual_control
     data:
       lights: '{{ light }}'
       manual_control: true
     entity_id: switch.adaptive_lighting_adaptive_lights
   - service: light.turn_on
     data:
       entity_id: '{{ light }}'
       transition: '{{ time }}'
   - delay: '{{ time }}'
   - service: adaptive_lighting.set_manual_control
     data:
       lights: '{{ light }}'
       manual_control: false
     entity_id: switch.adaptive_lighting_adaptive_lights
 mode: single

I’d wondered about simply calling a brightness in my fade in, though haven’t managed to get that to work (it’d be a data template off the adaptive lighting switch, and either I’m dumb and can’t get a template to combine with normal settings, or it doesn’t function like that). Plus that would need an additional automation to switch the lights back to auto control.

Sorry to disturb you again but i am trying to create an automation that starts the adaptive lighting over some of my lights at certain time, but still don’t know how to create it as i see the switches are already ‘on’ so, how to make the lights turn on with that switch?

Adaptive lighting itself does not turn lights on or off. You have to do that either via physical switch, motion control, script or automation. Adaptive lighting (when enabled/turned on) only controls the brightness, color or sleep mode of a light that is already on. You control the AL switch modes (on/off) either manually via a UI panel or via automations. Let’s say you want to automate the adaptive lighting control for brightness settings of bedroom lights and disable it from adjusting the brightness of the light(s) during the day but enable it at night:
Automation 1

alias: Adaptive Lighting - Disable Bedroom
description: ''
trigger:
  - platform: state
    entity_id: sun.sun
    to: above_horizon
condition: []
action:
  - service: switch.turn_off
    data: {}
    entity_id: switch.adaptive_lighting_adapt_brightness_bedroom
mode: single

Automation 2

alias: Adaptive Lighting - Enable Bedroom
description: ''
trigger:
  - platform: state
    entity_id: sun.sun
    to: below_horizon
condition: []
action:
  - service: switch.turn_on
    data: {}
    entity_id: switch.adaptive_lighting_adapt_brightness_bedroom
mode: single

You would do the same for color.
For sleep mode, create an input_boolean.sleep_mode. When you enable that boolean, the sleep mode settings of adaptive lighting are enabled. To disable AL sleep mode, turn the boolean off. If you do not want sleep mode for another AL group of lights, turn off that AL switch:

alias: Adaptive Lighting - Disable Office Sleep Mode
description: ''
trigger:
  - platform: state
    entity_id: sun.sun
    to: below_horizon
    for: '00:03:00'
condition: []
action:
  - service: switch.turn_off
    data: {}
    entity_id: switch.adaptive_lighting_sleep_mode_office
mode: single

I hope that helps!

1 Like

I have this automation for sleep mode:

alias: 'Adaptive lighting: toggle ''sleep mode'''
description: ''
trigger:
  - platform: state
    entity_id: input_boolean.sleep_mode
  - platform: homeassistant
    event: start
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.sleep_mode
            state: 'on'
        sequence:
          - service: switch.turn_on
            data: {}
            entity_id:
              - switch.adaptive_lighting_sleep_mode_bathroom
              - switch.adaptive_lighting_sleep_mode_bedroom
              - switch.adaptive_lighting_sleep_mode_office
      - conditions:
          - condition: state
            entity_id: input_boolean.sleep_mode
            state: 'off'
        sequence:
          - service: switch.turn_off
            data: {}
            entity_id:
              - switch.adaptive_lighting_sleep_mode_bathroom
              - switch.adaptive_lighting_sleep_mode_bedroom
              - switch.adaptive_lighting_sleep_mode_office
    default: []
mode: single
variables:
  sleep_mode: '{{ states(''input_boolean.sleep_mode'') }}'

You can even combine the two automations for the bedroom, like I described here:

:slight_smile:

Yes, most certainly! I do not have those first three automations.
I just quickly created them to illustrate to @maurizio53 what’s possible…

2 Likes

Nobody ever answered this?

See the PR at https://github.com/home-assistant/core/pull/40626

That was what I was initially referring to. It was previously posted as incoming for HA 0.118 but didn’t happen. Guessing 0.119 but it’s not stated from what I can see, hence I asked.