mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-09 23:02:59 +00:00
Fix sonos leader usage
This commit is contained in:
@@ -16,6 +16,17 @@ input_select:
|
||||
- media_player.living_room
|
||||
- media_player.kitchen
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
sonos_leader_paused:
|
||||
value_template: "{{ is_state(states.input_select.sonos_leader.state, 'paused') }}"
|
||||
entity_id:
|
||||
- input_select.sonos_leader
|
||||
- media_player.master_bedroom
|
||||
- media_player.kitchen
|
||||
- media_player.living_room
|
||||
|
||||
script:
|
||||
music_play:
|
||||
alias: Music · Play
|
||||
|
||||
@@ -67,8 +67,7 @@ script:
|
||||
message: "{{ message }}"
|
||||
# Wait for phrase to be over and mark as not talking.
|
||||
- delay: 00:00:01
|
||||
# TODO: Use sonos_leader, otherwise the whole thing is kinda pointless :/
|
||||
- wait_template: "{{ is_state('media_player.master_bedroom', 'paused') }}"
|
||||
- wait_template: "{{ is_state('binary_sensor.sonos_leader_paused', 'on') }}"
|
||||
timeout: 00:02:00
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.sarah_talking
|
||||
|
||||
Reference in New Issue
Block a user