Skip speakers that are unavailable for volume reset, fixes #177
This commit is contained in:
@ -322,6 +322,8 @@ script:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.studio_quiet
|
entity_id: input_boolean.studio_quiet
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('media_player.basement_echo_dot') not in ['unavailable','unknown'] }}"
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -355,6 +357,8 @@ script:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.studio_quiet
|
entity_id: input_boolean.studio_quiet
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('media_player.basement_google_speaker') not in ['unavailable','unknown'] }}"
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -397,6 +401,10 @@ script:
|
|||||||
data:
|
data:
|
||||||
is_volume_muted: false
|
is_volume_muted: false
|
||||||
# Living Room Echo Dot
|
# Living Room Echo Dot
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('media_player.living_room_echo_dot') not in ['unavailable','unknown'] }}"
|
||||||
|
then:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
@ -424,6 +432,8 @@ script:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.master_bedroom_sleeping
|
entity_id: input_boolean.master_bedroom_sleeping
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('media_player.master_bedroom_echo_dot') not in ['unavailable','unknown'] }}"
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -457,6 +467,8 @@ script:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.kallen_sleeping
|
entity_id: input_boolean.kallen_sleeping
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('media_player.kallen_bedroom_google_speaker') not in ['unavailable','unknown'] }}"
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -508,6 +520,8 @@ script:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.emma_sleeping
|
entity_id: input_boolean.emma_sleeping
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ states('media_player.emma_bedroom_google_speaker') not in ['unavailable','unknown'] }}"
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
|
Reference in New Issue
Block a user