New Adaptive Lighting Integration

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

Thanks @dbrunt, that did it…somewhat. Now it works fine if I control the light via the light.turn_on service, but fails completely for light.toggle which happens to be my actual service call in node-red :frowning:

Any chance light.toggle could also be implemented?

Hi all!

I’ve opened a new topic here with documentation (💡 Adaptive Lighting Custom Component that automatically adapts the brightness and color of your lights based on the sun's temperature but stops when you manually make a change).

Also, @dedepene, I’ve made some changes to the separate_turn_on_commands. I think it should work with your IKEA lights now :wink:

I can’t find this in the documentation, could somebody point me to it? I’m having IKEA lights as well and think this might fix my problems.

I can’t find it either. I’ve posted a heads-up in @basnijholt’s new topic.
Are you using the config flow (I think that’s the term) or yaml?
In config flow, the option is the very last item tick box in the switch configuration as per my screenshot.
In yaml, it should be separate_turn_on_commands: true

@haseat It’s there now!

1 Like

The Adaptive Lightning is awesome! I am looking for a way to adapt the color temperature of a group of lights by Adaptive Lightning, and at the same time adapt the brightness based on the number of lux (i’ve got a Philips Hue sensor). How could I achieve that?

In the way i’ve curently done it, it is not as smooth as i like it:
step 1: divide lux levels in 3 groups (low light level, medium light level, high light level). With low light light, it is activating a bright scene, with medium light level a medium scene, with high level all lights off.
step 2: adaptive lightning is changing the color temperature. This is causing a visual change in color temperature every time the scene is changed. Reason: the scene is already inherently containing a certain color temperature, which Adaptive Lightning is then correcting.

This is why I am looking for a way to set the brightness (lux-based) and color temperature (Adaptive Lightning) at the same.

I am not sure what you want can be achieved, if I understand correctly.
You want to manually set the brightness based on a lux sensor but permit AL to control the color?
Have you tried this option:
image
so that your scene can set the brightness?
The problem I see with this though is AL might no longer adapt the color…

What about disabling the above option and turning off the brightness switch(es)?

BTW, Welcome to the wonderful world of Home Assistant!!!

1 Like

I’m confused by this. Do you want or NOT want AL to adapt the color???