2023-06-12 21:56:22 +00:00
|
|
|
- id: button_lights_on
|
2021-05-25 11:28:01 +00:00
|
|
|
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:
|
2021-11-12 02:30:51 +00:00
|
|
|
- service: script.bathroom_lights_on
|
2021-05-25 11:28:01 +00:00
|
|
|
mode: single
|
|
|
|
|
2023-06-12 21:56:22 +00:00
|
|
|
- id: bathroom_lights_off
|
2021-05-25 11:28:01 +00:00
|
|
|
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
|
2023-06-07 16:17:45 +00:00
|
|
|
entity_id: binary_sensor.bathroom_shower_sensor_motion
|
2021-05-25 11:54:21 +00:00
|
|
|
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
|
2023-06-07 16:17:45 +00:00
|
|
|
entity_id: binary_sensor.bathroom_shower_sensor_motion
|
2021-05-25 11:54:21 +00:00
|
|
|
for: '0:02:00'
|
|
|
|
state: 'off'
|
2021-05-25 11:28:01 +00:00
|
|
|
action:
|
2021-11-12 02:30:51 +00:00
|
|
|
- service: script.bathroom_lights_off
|
|
|
|
|
2023-06-12 21:56:22 +00:00
|
|
|
- id: button_bathroom_on_off
|
2021-11-12 02:30:51 +00:00
|
|
|
alias: '[Bathroom] Button On/Off'
|
2023-10-11 20:10:07 +00:00
|
|
|
mode: single
|
2021-11-12 02:30:51 +00:00
|
|
|
trigger:
|
2022-01-10 23:12:18 +00:00
|
|
|
- device_id: 36bf09a72c8115dd3afd832e83cf38ea
|
2021-11-12 02:30:51 +00:00
|
|
|
domain: zha
|
|
|
|
platform: device
|
2022-01-10 23:12:18 +00:00
|
|
|
type: remote_button_alt_short_press
|
|
|
|
subtype: button_1
|
|
|
|
- device_id: 36bf09a72c8115dd3afd832e83cf38ea
|
|
|
|
domain: zha
|
|
|
|
platform: device
|
|
|
|
type: remote_button_alt_short_press
|
|
|
|
subtype: button_2
|
2021-11-12 02:30:51 +00:00
|
|
|
action:
|
2022-01-30 16:37:13 +00:00
|
|
|
- choose:
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: light.bathroom_lights
|
|
|
|
state: 'on'
|
|
|
|
sequence:
|
|
|
|
- service: automation.turn_on
|
|
|
|
target:
|
|
|
|
entity_id:
|
|
|
|
- automation.bathroom_shower_motion_off
|
|
|
|
- automation.bathroom_lights_off
|
2023-10-11 20:10:07 +00:00
|
|
|
- service: script.bathroom_lights_toggle
|