fix: ignore unavailable entities
This commit is contained in:
@@ -1617,7 +1617,7 @@ action:
|
||||
sequence:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ repeat.item.entity|length > 0 }}'
|
||||
value_template: '{{ repeat.item.entity|length > 0 and states[repeat.item.entity].state != "unavailable" }}'
|
||||
then:
|
||||
- variables:
|
||||
component_to_update: "{{ repeat.item.button }}"
|
||||
@@ -1729,7 +1729,7 @@ action:
|
||||
##### NSPanel boot init - Hotwater #####
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ hotwatertemp is match "sensor." }}'
|
||||
value_template: '{{ hotwatertemp is match "sensor." and states(hotwatertemp).state != "unavailable" }}'
|
||||
then:
|
||||
- delay:
|
||||
milliseconds: "{{ delay_value }}"
|
||||
@@ -1801,7 +1801,7 @@ action:
|
||||
##### SET Left Hardware Button PIC on Home Page ####
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ left_button_entity |length > 0 }}'
|
||||
value_template: '{{ left_button_entity |length > 0 and states(left_button_entity).state != "unavailable" }}'
|
||||
then:
|
||||
- variables:
|
||||
# Hardware Button PIC
|
||||
@@ -1830,7 +1830,7 @@ action:
|
||||
###### SET Right Hardware Button PIC on Home Page #####
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ right_button_entity |length > 0 }}'
|
||||
value_template: '{{ right_button_entity |length > 0 and states(right_button_entity).state != "unavailable" }}'
|
||||
then:
|
||||
- variables:
|
||||
# Hardware Button PIC
|
||||
|
||||
Reference in New Issue
Block a user