Skip to content

Different color and brigtness update times #1333

@zsojma

Description

@zsojma

Hello, is there please a way how to set it up to have a postponed sunset time to adjust only brightness and at the same time to use color temp based on regular sunset time?

I would like to achieve a behavior where a light shines 100% until 8 PM regardless of sunset time but I want the color to change gradually to low temperatures that are more convenient for the current day-time.

I tried to setup two adaptive lightning entries to control the same lights where one adjusts only color and another only brightness, but it does not seem to work:

- name: dining_brightness
  lights:
    - light.dining_lgt_table_1
    - light.dining_lgt_table_2
    - light.dining_lgt_table_3
    - light.dining_lgt_side

  min_brightness: 30
  max_brightness: 100
  min_color_temp: 2700
  max_color_temp: 2700
  min_sunset_time: "20:00:00"

- name: dining_color
  lights:
    - light.dining_lgt_table_1
    - light.dining_lgt_table_2
    - light.dining_lgt_table_3
    - light.dining_lgt_side

  min_brightness: 100
  max_brightness: 100
  min_color_temp: 2700
  max_color_temp: 6500

And the script starts both like this:

      - service: switch.turn_on
        target:
          entity_id:
            - "switch.adaptive_lighting_dining_color"
            - "switch.adaptive_lighting_dining_brightness"
            - "switch.adaptive_lighting_adapt_color_dining_color"
            - "switch.adaptive_lighting_adapt_brightness_dining_brightness"
      - service: switch.turn_off
        target:
          entity_id:
            - "switch.adaptive_lighting_adapt_color_dining_brightness"
            - "switch.adaptive_lighting_adapt_brightness_dining_color"

When the lights turn on, the first command through MQTT is the following:

{
    "state": "ON"
}

And the second one is this:

{
    "state": "ON",
    "transition": 1,
    "brightness": 254
}

I would expect one command to set just brightness and another just color_temp. Is this a supported functionality and if so, can someone please spot what I'm doing wrong?

Note: I also looks to me that there are no other commands sent to the lights after turn on. It seems that the entries are in conflict and the both stop working.
(I'm using some other entries for different lights and those work correctly, but this is a first case where I would like to detach brightness sunset time from color one)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions