hass-circadian_lighting
hass-circadian_lighting copied to clipboard
Does this work on `service: scene.` ?
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: {}
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.