Skip speakers that are unavailable for volume reset, fixes #177

This commit is contained in:
2023-12-03 17:33:05 -05:00
parent d9dc03f9e5
commit 38bafe6e43

View File

@ -322,6 +322,8 @@ script:
- condition: state
entity_id: input_boolean.studio_quiet
state: 'off'
- condition: template
value_template: "{{ states('media_player.basement_echo_dot') not in ['unavailable','unknown'] }}"
then:
- if:
- condition: template
@ -355,6 +357,8 @@ script:
- condition: state
entity_id: input_boolean.studio_quiet
state: 'off'
- condition: template
value_template: "{{ states('media_player.basement_google_speaker') not in ['unavailable','unknown'] }}"
then:
- if:
- condition: template
@ -397,6 +401,10 @@ script:
data:
is_volume_muted: false
# Living Room Echo Dot
- if:
- condition: template
value_template: "{{ states('media_player.living_room_echo_dot') not in ['unavailable','unknown'] }}"
then:
- if:
- condition: template
value_template: >
@ -424,6 +432,8 @@ script:
- condition: state
entity_id: input_boolean.master_bedroom_sleeping
state: 'off'
- condition: template
value_template: "{{ states('media_player.master_bedroom_echo_dot') not in ['unavailable','unknown'] }}"
then:
- if:
- condition: template
@ -457,6 +467,8 @@ script:
- condition: state
entity_id: input_boolean.kallen_sleeping
state: 'off'
- condition: template
value_template: "{{ states('media_player.kallen_bedroom_google_speaker') not in ['unavailable','unknown'] }}"
then:
- if:
- condition: template
@ -508,6 +520,8 @@ script:
- condition: state
entity_id: input_boolean.emma_sleeping
state: 'off'
- condition: template
value_template: "{{ states('media_player.emma_bedroom_google_speaker') not in ['unavailable','unknown'] }}"
then:
- if:
- condition: template