1
0
ansible-home-assistant/configuration/automations/bathroom-button.yaml

76 lines
2.9 KiB
YAML
Raw Normal View History

- id: button-bathroom-on-off
alias: '[Bathroom] Button On/Off'
2021-01-01 02:59:21 +00:00
trigger:
2021-08-12 23:12:25 +00:00
- device_id: 0c23a8e92f43f628e584dc1805c6915e
2021-01-01 02:59:21 +00:00
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
action:
- choose:
- conditions:
- condition: state
entity_id: light.bathroom_lights
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.bathroom_lights
- service: light.turn_off
entity_id: light.bathroom_mirror_lights
- service: light.turn_off
entity_id: light.shower_lights
2021-09-22 20:54:07 +00:00
- service: light.turn_off
entity_id: light.bathroom_color_zha_group_0x0007
- service: media_player.turn_off
entity_id: media_player.bathroom_speaker
- conditions:
- condition: state
entity_id: light.bathroom_lights
state: 'off'
sequence:
- choose:
- conditions:
- condition: state
2021-09-22 20:54:07 +00:00
entity_id: input_select.home_mode
state: Day
sequence:
2021-09-22 20:54:07 +00:00
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
entity_id: light.bathroom_lights
data:
2021-09-22 21:14:58 +00:00
brightness: 255
- service: light.turn_on
entity_id: light.bathroom_lights
data:
2021-09-22 20:54:07 +00:00
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.turn_on
entity_id: light.bathroom_lights
data:
kelvin: 3200
2021-09-22 21:14:58 +00:00
- service: light.turn_on
entity_id: light.bathroom_lights
data:
brightness: 255
- conditions:
- condition: state
2021-09-22 20:54:07 +00:00
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
2021-09-22 20:54:07 +00:00
entity_id: light.bathroom_color_zha_group_0x0007
data:
2021-09-22 20:54:07 +00:00
brightness_pct: 5
hs_color:
- 360
- 100
2021-01-01 02:59:21 +00:00
mode: single