2021-05-25 11:28:01 +00:00
|
|
|
- id: button-lights-on
|
|
|
|
alias: '[Bathroom] Lights On'
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
|
|
to: 'on'
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.bathroom_door_open_close
|
|
|
|
to: 'on'
|
|
|
|
action:
|
|
|
|
- choose:
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_select.home_mode
|
|
|
|
state: Day
|
|
|
|
sequence:
|
|
|
|
- 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-05-25 11:28:01 +00:00
|
|
|
kelvin: 2000
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.sleep_mode
|
|
|
|
state: 'off'
|
|
|
|
sequence:
|
2021-05-25 14:56:30 +00:00
|
|
|
- service: light.turn_on
|
2021-05-25 11:28:01 +00:00
|
|
|
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-05-25 11:28:01 +00:00
|
|
|
kelvin: 3200
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
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
|
2021-05-25 11:28:01 +00:00
|
|
|
data:
|
|
|
|
brightness_pct: 5
|
2021-09-22 20:54:07 +00:00
|
|
|
hs_color:
|
|
|
|
- 360
|
|
|
|
- 100
|
2021-05-25 11:28:01 +00:00
|
|
|
mode: single
|
|
|
|
|
|
|
|
- id: bathroom-lights-off
|
|
|
|
alias: '[Bathroom] Lights Off'
|
|
|
|
mode: restart
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
|
|
for: '0:05:00'
|
|
|
|
from: 'on'
|
|
|
|
to: 'off'
|
2021-05-25 11:54:21 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
|
|
|
for: '0:02:00'
|
|
|
|
from: 'on'
|
|
|
|
to: 'off'
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
2021-05-25 12:33:35 +00:00
|
|
|
for: '0:05:00'
|
2021-05-25 11:54:21 +00:00
|
|
|
state: 'off'
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
|
|
|
for: '0:02:00'
|
|
|
|
state: 'off'
|
2021-05-25 11:28:01 +00:00
|
|
|
action:
|
|
|
|
- service: light.turn_off
|
2021-05-25 11:54:21 +00:00
|
|
|
entity_id: light.bathroom_lights
|
2021-06-30 09:52:38 +00:00
|
|
|
- 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
|