Hey guys, Im a fond user of Adaptive Lighting integration.
But I have garden lights that I want to turn on when the sun is going down and increase brightness towards midnight and again decrease towards sunrise.
I just cant seem to get the integration to automate this in reverse.
The numbers 2127 and 6535 represent the min_color_temp_kelvin and max_color_temp_kelvin respectively of the lights
You can get those numbers from Developer Tools > States > light.your_light
You should also set those values to the component’s configuration for min_color_temp and max_color_temp
No need to restart HA, just reload the templates from Developer Tools > Yaml
Once you have your sensors, create an automation triggered by your sensors changing, and then set the brightness_pct and color_temp to the values of the sensors:
alias: Adjust Adaptive Lighting
description: ""
trigger:
- platform: state
entity_id:
- sensor.adaptive_lighting_brightness
- platform: state
entity_id:
- sensor.adaptive_lighting_color_temp
condition: []
action:
- service: script.g_adaptive_lighting
data: {}
mode: single
Which calls this script:
alias: G - Adaptive Lighting
sequence:
- service: light.turn_on
data:
kelvin: "{{ states('sensor.adaptive_lighting_color_temp') | int }}"
brightness_pct: "{{ states('sensor.adaptive_lighting_brightness') | int }}"
target:
entity_id: light.all_lights
mode: single
icon: mdi:script-outline