New Adaptive Lighting Integration

I don’t know. I’m using it via https://github.com/basnijholt/adaptive-lighting

From what I can see here it is currently categorized as ‘Incoming’ in the ‘New Integrations’ pipeline:

So probably 1.0.0 non-beta? Just go ahead and install it! It’s working fine for me!!

I had a weird issue with the Lovelace UI in 1.0.0b0 which I fumbled through and then it disappeared/cleared up in 0b1 (the …, edit menus were strange). I was afraid it was an issue with the custom-ui add-in I have loaded but as I said 0b1 cleared it up. No issues with the AL integration…

@dbrunt Great add-on. Is there any way to set the sunrise time dynamically? I get up at a different time each day. I have an automation that turns on my lights based on my phone’s alarm. I’d like to adjust the sunrise time based on my phone’s alarm as well.

No, you can only hard code your own sunrise time in the integration.
To achieve what you want, the integration would have to allow you to input a templated time from another entity into the field…

Is there any reason the sunrise_time and similar values couldn’t be stored in the switch entity rather than the component? Then they could be set by script

I’ve posted a feature request to permit templating the desired sunrise/sunset time entry.
Example:

{{ as_timestamp(states.sensor.vog_l04_next_alarm.state)|timestamp_custom ('%H:%M:%S')  }}

You’d have to invoke the attention of the author @basnijholt

Oh, shoot. I had thought you were the author. Sorry about that.

I gathered as much! No worries! I’ve modified post #1 to be more clear.

I authored this post to raise attention to Bas’ great work since there was no mention of the new integration here in the community except for a few posts he made in another Circadian Lighting post…

1 Like

I’m getting resistance to my feature request! They haven’t yet asked “why would you want to do that” so I’ll ask, why would you want or need to do that?

Since the integration supports yaml config, you could try templating your sunrise value for the switch there?

sunrise_time: >
  {{ as_timestamp(states.sensor.vog_l04_next_alarm.state)|timestamp_custom ('%H:%M:%S')  }}

See https://deploy-preview-14877--home-assistant-docs.netlify.app/integrations/adaptive_lighting/

I don’t think this will work. I tried it with Circadian Lighting, which as I understand it is relevantly identical, and it did not work. And in this thread, I was told that the .py schema for Adaptive Lighting would need to be modified to support a template input.

You would be correct! It does not work…

adaptive_lighting:
  - name: "New Bedroom"
    lights: [light.bedroom_light]
    initial_transition: 2
    transition: 59
    interval: 60
    min_brightness: 20
    max_brightness: 100
    min_color_temp: 2700
    max_color_temp: 5500
    sleep_brightness: 1
    sleep_color_temp: 2700
    sunrise_time: "09:35:00"
#      {{ as_timestamp(states.sensor.vog_l04_next_alarm.state)|timestamp_custom ('%H:%M:%S')  }}
    sunrise_offset: 0
    sunset_time: "18:00:00"
    sunset_offset: 0
    only_once: false
    take_over_control: true
    detect_non_ha_changes: true
    separate_turn_on_commands: false

You could use sleep mode to set a reduced brightness/color temp until you’re fully awake and turn off sleep mode. My sleep mode is controlled through Alexa via “Good Morning”/“Good Night” routines which trigger Alexa scenes/HA scripts. Also, while in sleep mode, my motion sensing via Magic Areas for the bedroom is disabled. Previously I was using Entity Controller for motion activation and had my sleep_mode in it as well but as an override entity:

  bedroom_lights_control:
    friendly_name: Bedroom Lights Control
    sensor: binary_sensor.lumi_sensor_motion_bedroom
    sensor_type: duration
    state_attributes_ignore:
      - color_temp
      - brightness
    entity: light.bedroom_lights
    override: 
      - input_boolean.sleep_mode
    service_data:
      brightness: 30
    service_data_on: 
      transition: 3
    service_data_off: 
      transition: 5
    start_time: sunset - 00:30:00
    end_time: sunrise + 00:30:00
    end_time_action: "off"
1 Like

That indeed doesn’t work, but perhaps I can make it work!

That, or by making people set the time using a service_call.

2 Likes

@dchawisher will be happy to hear that! Thanks!!

1 Like

Apparently the IKEA Tradfri implementation does not allow for simultaneous receipt of brightness AND color temp adjustments. As a result it’s a random affair with their CCT bulbs - either bri or color temp will be randomly adjusted, never both on a turn_on event :+1:

I wonder if there’s a workaround with the settings of this integration?

Check the very last option in configuration settings for the switch…something about separate commands?

1 Like

image

1 Like