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