hass-circadian_lighting icon indicating copy to clipboard operation
hass-circadian_lighting copied to clipboard

Does this work on `service: scene.` ?

Open Gil80 opened this issue 10 months ago • 1 comments

Does this work on scenes too?

This is what I have:

action:
  - choose:
        - conditions:
               - condition: template
                  value_template: "{{ trigger.to_state.state == 'on' }}"
          sequence:
              - service: scene.turn_on
                 target:
                    entity_id: scene.evning_light_color
                 metadata: {}

Will this work if I set it up like this?

action:
  - choose:
        - conditions:
               - condition: template
                  value_template: "{{ trigger.to_state.state == 'on' }}"
          sequence:
              - service: scene.turn_on
                 target:
                    entity_id: scene.evning_light_color
                    data_template:
                    entity_id: light.entity
                    kelvin: "{{ state_attr('sensor.circadian_values', 'colortemp') | int }}"
                   brightness_pct: "{{ state_attr('switch.circadian_lighting_[...]', 'brightness') | int }}"
                 metadata: {}

Gil80 avatar Aug 24 '23 10:08 Gil80

This question doesn't actually relate to the integration; the template you described should translate into proper values for kelvin and brightness_pct.

Speaking generally, I don't believe the scene.turn_on service allows you to pass in entity_id, kelvin, brightness_pct, or anything else under data or data_template - have you seen the ability to do so documented anywhere? I'm also not sure what you're trying to accomplish by turning on a scene and also passing values from Circadian Lighting.

claytonjn avatar Aug 24 '23 20:08 claytonjn