1
0
ansible-home-assistant/configuration/automations/office-blinds.yaml

72 lines
2.1 KiB
YAML

- id: office-blinds-button-up
alias: '[Office Blinds] Up'
trigger:
- device_id: a47c928b108240ed8866f9f7a70bc844
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
action:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: cover.office_blinds
state: 'closing'
- condition: state
entity_id: cover.office_blinds
state: 'opening'
sequence:
- service: cover.stop_cover
entity_id: cover.office_blinds
- conditions:
- condition: or
conditions:
- condition: state
entity_id: cover.office_blinds
state: 'closed'
- condition: state
entity_id: cover.office_blinds
state: 'open'
sequence:
- service: cover.close_cover
entity_id: cover.office_blinds
mode: single
- id: office-blinds-button-down
alias: '[Office Blinds] Down'
trigger:
- device_id: a47c928b108240ed8866f9f7a70bc844
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_off
action:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: cover.office_blinds
state: 'closing'
- condition: state
entity_id: cover.office_blinds
state: 'opening'
sequence:
- service: cover.stop_cover
entity_id: cover.office_blinds
- conditions:
- condition: or
conditions:
- condition: state
entity_id: cover.office_blinds
state: 'closed'
- condition: state
entity_id: cover.office_blinds
state: 'open'
sequence:
- service: cover.open_cover
entity_id: cover.office_blinds
mode: single