Files
sarah/packages/devices/bedroom/bedside_switch.yaml
T
2022-12-01 16:02:00 +02:00

24 lines
660 B
YAML

automation:
- alias: Bedroom · Bedside Switch
use_blueprint:
path: aqara_switch.yaml
input:
action_entity: sensor.bedside_switch_action
click:
- service: light.toggle
data_template:
entity_id: >-
{% if is_state('input_select.bedroom_mode', 'day') %}
light.master_bedroom_main
{% else %}
light.bedside
{% endif %}
brightness_pct: 100
double_click:
- service: light.toggle
entity_id: light.bedside
hold:
- service: script.toggle_bedroom_mode