mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
automation:
|
|
- alias: Lighting · Master bedroom · Toggle lights on switch single click
|
|
trigger:
|
|
platform: event
|
|
event_type: zha_event
|
|
event_data:
|
|
device_ieee: !secret master_bedroom_switch_ieee
|
|
command: single
|
|
action:
|
|
- service: light.toggle
|
|
data_template:
|
|
entity_id: light.master_bedroom_main
|
|
brightness_pct: >-
|
|
|
|
{% if is_state('input_select.house_mode', 'night') %}
|
|
40
|
|
{% else %}
|
|
100
|
|
{% endif %}
|
|
|
|
- alias: Lighting · Master bedroom · Toggle ambient lights on switch double click
|
|
trigger:
|
|
platform: event
|
|
event_type: zha_event
|
|
event_data:
|
|
device_ieee: !secret master_bedroom_switch_ieee
|
|
command: double
|
|
action:
|
|
- service: light.toggle
|
|
data_template:
|
|
entity_id:
|
|
- light.bedside
|
|
- light.bed_led
|
|
brightness_pct: 100
|
|
|
|
- alias: Music · Master bedroom · Play pause on switch hold
|
|
trigger:
|
|
platform: event
|
|
event_type: zha_event
|
|
event_data:
|
|
device_ieee: !secret master_bedroom_switch_ieee
|
|
command: hold
|
|
action:
|
|
- service: media_player.media_play_pause
|
|
entity_id: media_player.master_bedroom
|