2021-01-08 21:51:30 +00:00
|
|
|
- id: bathroom-music-on
|
|
|
|
alias: '[Bathroom] Music On'
|
|
|
|
mode: restart
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
|
|
|
from: 'off'
|
|
|
|
to: 'on'
|
2021-01-23 14:25:30 +00:00
|
|
|
- device_id: 4d5298037e93ba11438409bff01b5005
|
|
|
|
domain: zha
|
|
|
|
platform: device
|
|
|
|
type: remote_button_short_press
|
|
|
|
subtype: turn_on
|
2021-01-15 09:03:20 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.bathroom_speaker
|
|
|
|
state: 'off'
|
2021-01-08 21:51:30 +00:00
|
|
|
action:
|
2021-08-11 21:57:13 +00:00
|
|
|
- service: media_player.play_media
|
|
|
|
target:
|
|
|
|
entity_id: media_player.bathroom
|
2021-01-08 21:51:30 +00:00
|
|
|
data:
|
2021-08-11 21:57:13 +00:00
|
|
|
media_content_id: https://open.spotify.com/playlist/71mXIu6HcdVj3fAMduaHop
|
|
|
|
media_content_type: music
|
2021-05-25 11:54:21 +00:00
|
|
|
|
2021-01-08 21:51:30 +00:00
|
|
|
- id: bathroom-music-off
|
|
|
|
alias: '[Bathroom] Music Off'
|
|
|
|
mode: restart
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
|
|
|
for: '0:01:00'
|
|
|
|
from: 'on'
|
|
|
|
to: 'off'
|
|
|
|
- platform: state
|
2021-05-06 23:03:19 +00:00
|
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
2021-01-08 21:51:30 +00:00
|
|
|
for: '0:01:00'
|
|
|
|
from: 'on'
|
|
|
|
to: 'off'
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: binary_sensor.shower_motion
|
2021-01-15 09:03:20 +00:00
|
|
|
state: 'off'
|
2021-01-08 21:51:30 +00:00
|
|
|
- condition: state
|
2021-05-06 23:03:19 +00:00
|
|
|
entity_id: binary_sensor.bathroom_motion_occupancy
|
2021-01-15 09:03:20 +00:00
|
|
|
state: 'off'
|
2021-01-08 21:51:30 +00:00
|
|
|
action:
|
|
|
|
- service: media_player.turn_off
|
|
|
|
entity_id: media_player.bathroom_speaker
|