1
0
ansible-home-assistant/roles/automations/files/bedroom-button.yaml

115 lines
2.8 KiB
YAML

# Single click
- id: bedroom_button_turn_on
alias: '[Bedroom] Button Turn On'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
action:
- service: script.bedroom_lights_on
- id: bedroom_button_turn_off
alias: '[Bedroom] Button Turn Off'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_off
action:
- service: script.bedroom_all_lights_off
- id: bedroom_button_dim_up
alias: '[Bedroom] Button Dim Up'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_short_press
subtype: dim_up
action:
- service: light.turn_on
data:
brightness_step_pct: 10
entity_id: light.bedroom_lights
- id: bedroom_button_dim_down
alias: '[Bedroom] Button Dim Down'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_short_press
subtype: dim_down
action:
- service: light.turn_on
data:
brightness_step_pct: -10
entity_id: light.bedroom_lights
# Double click
- id: bedroom_button_dim_up_double
alias: '[Bedroom] Button Dim Up Double'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_double_press
subtype: dim_up
action:
- service: light.turn_on
data:
brightness_pct: 90
kelvin: 3200
entity_id: light.bedroom_lights
- id: bedroom_button_dim_down_double
alias: '[Bedroom] Button Dim Down double'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_double_press
subtype: dim_down
action:
- service: light.turn_on
data:
brightness_pct: 10
kelvin: 2000
entity_id: light.bedroom_lights
# Held
- id: bedroom_button_turn_on_held
alias: '[Bedroom] Button Blinds up'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_long_press
subtype: turn_on
action:
- service: cover.open_cover
entity_id: cover.bedroom_blinds
- id: bedroom_button_turn_off_held
alias: '[Bedroom] Button Blinds down'
mode: single
trigger:
- device_id: 15b083b6b5e2acb5d37fbbfbfc76281f
domain: zha
platform: device
type: remote_button_long_press
subtype: turn_off
action:
- service: cover.close_cover
entity_id: cover.bedroom_blinds