initial commit
This commit is contained in:
46
configuration/automation/remote_control_light_kitchen.yaml
Normal file
46
configuration/automation/remote_control_light_kitchen.yaml
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
- alias: "[Remote Control] Kitchen Scene Next"
|
||||
initial_state: 'true'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.remote_kitchen_01_action
|
||||
to: "arrow_right_click"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kitchen_light_state
|
||||
state: "on"
|
||||
action:
|
||||
- service: input_select.select_next
|
||||
target:
|
||||
entity_id: input_select.kitchen_scenes
|
||||
|
||||
- alias: "[Remote Control] Kitchen Scene Prev"
|
||||
initial_state: 'true'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.remote_kitchen_01_action
|
||||
to: "arrow_left_click"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kitchen_light_state
|
||||
state: "on"
|
||||
action:
|
||||
- service: input_select.select_previous
|
||||
target:
|
||||
entity_id: input_select.kitchen_scene
|
||||
|
||||
- alias: "[Remote Control] Kitchen Scene On"
|
||||
initial_state: 'true'
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.remote_kitchen_01_action
|
||||
to: "toggle"
|
||||
action:
|
||||
- service_template: >
|
||||
{% if states.input_boolean.kitchen_light_state.state == 'off' %}
|
||||
input_boolean.turn_on
|
||||
{% else %}
|
||||
input_boolean.turn_off
|
||||
{% endif %}
|
||||
entity_id:
|
||||
- input_boolean.kitchen_light_state
|
Reference in New Issue
Block a user