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:
|
2021-11-12 02:30:51 +00:00
|
|
|
- service: script.bathroom_lights_on
|
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:
|
2021-11-12 02:30:51 +00:00
|
|
|
- service: script.bathroom_lights_off
|
|
|
|
|
|
|
|
- id: button-bathroom-on-off
|
|
|
|
alias: '[Bathroom] Button On/Off'
|
|
|
|
trigger:
|
|
|
|
- device_id: 0c23a8e92f43f628e584dc1805c6915e
|
|
|
|
domain: zha
|
|
|
|
platform: device
|
|
|
|
type: remote_button_short_press
|
|
|
|
subtype: turn_on
|
|
|
|
action:
|
|
|
|
- service: script.bathroom_lights_toggle
|
|
|
|
mode: single
|