2021-01-01 02:59:21 +00:00
|
|
|
- id: bathroom-shower-motion-on
|
2021-01-07 00:48:14 +00:00
|
|
|
alias: '[Bathroom] Shower Motion On'
|
2021-01-01 02:59:21 +00:00
|
|
|
mode: restart
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
|
|
|
from: 'off'
|
|
|
|
to: 'on'
|
|
|
|
action:
|
2021-11-12 02:30:51 +00:00
|
|
|
- service: script.bathroom_shower_lights_on
|
2022-01-10 23:14:00 +00:00
|
|
|
- choose:
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bathroom
|
|
|
|
state: playing
|
|
|
|
sequence:
|
|
|
|
- service: media_player.volume_set
|
|
|
|
data:
|
|
|
|
volume_level: 0.65
|
|
|
|
target:
|
|
|
|
entity_id: media_player.bathroom
|
2021-05-10 10:24:31 +00:00
|
|
|
|
2022-04-29 19:24:36 +00:00
|
|
|
- alias: '[Bathroom] Shower Motion Off'
|
2021-01-01 02:59:21 +00:00
|
|
|
mode: restart
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
2021-05-25 11:54:21 +00:00
|
|
|
for: '0:02:00'
|
2021-01-01 02:59:21 +00:00
|
|
|
from: 'on'
|
|
|
|
to: 'off'
|
2021-05-25 11:54:21 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
|
|
|
for: '0:05:00'
|
|
|
|
from: 'on'
|
|
|
|
to: 'off'
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
|
|
|
for: '0:02:00'
|
|
|
|
state: 'off'
|
2021-01-01 02:59:21 +00:00
|
|
|
action:
|
2022-01-10 23:14:00 +00:00
|
|
|
- service: script.bathroom_shower_lights_off
|
|
|
|
- choose:
|
|
|
|
- conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bathroom
|
|
|
|
state: playing
|
|
|
|
sequence:
|
2022-04-29 19:24:36 +00:00
|
|
|
- repeat:
|
|
|
|
until:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bathroom
|
|
|
|
attribute: volume_level
|
|
|
|
state: '0.45'
|
|
|
|
sequence:
|
|
|
|
- service: media_player.volume_down
|
|
|
|
target:
|
|
|
|
entity_id: media_player.bathroom
|
|
|
|
- delay:
|
|
|
|
seconds: 10
|