fix: ignore unavailable entities

This commit is contained in:
Chris
2022-11-19 21:40:15 +01:00
parent 5c750bed34
commit de5a3d843a

View File

@@ -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