25 lines
675 B
YAML
25 lines
675 B
YAML
---
|
|
- alias: "[Kitchen] Light On (by input_boolean)"
|
|
initial_state: "true"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.kitchen_light_state
|
|
to: "on"
|
|
action:
|
|
- service: scene.turn_on
|
|
data_template:
|
|
entity_id: scene.kitchen_{{ states.input_text.kitchen_last_scene.state | replace(' ', '_') | lower | string }}
|
|
transition: 2.5
|
|
|
|
- alias: "[Kitchen] Light Off (by input boolean)"
|
|
initial_state: "true"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.kitchen_light_state
|
|
to: "off"
|
|
action:
|
|
- service: scene.turn_on
|
|
data_template:
|
|
entity_id: scene.kitchen_off
|
|
transition: 2.5
|