From de5a3d843a462cca91b803d6ee13a84c957bbf93 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 19 Nov 2022 21:40:15 +0100 Subject: [PATCH] fix: ignore unavailable entities --- blueprint.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blueprint.yaml b/blueprint.yaml index aa215cd..2f2a93b 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -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