From ec68abb7e3fdd56428291dd5607b210795ac88b5 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sat, 15 Apr 2023 14:53:02 +0200 Subject: [PATCH] Fix button showing as unavailable on HA restart Buttons should show as `off` when state is `unknown`. Same is valid for: - button - input_button - scene --- nspanel_blueprint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 3fa69a3..cca4840 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -4442,7 +4442,7 @@ action: item_domain: "{{ repeat.item.entity.split('.')[0] | default('unknown') }}" # {{ states(entity_id) | default('unavailable') if entity_id is string else 'unavailable' }} current_entity_state: "{{ states(repeat.item.entity) | default('unavailable') }}" - current_entity_state_available: "{{ current_entity_state not in ['unknown', 'unavailable', None] }}" + current_entity_state_available: "{{ current_entity_state not in ['unavailable'] }}" # Button PIC GRAY/WHITE btn_pic: "{{ nextion.pics.button.on if current_entity_state in ['on', 'open', 'opening', 'home'] or (item_domain == 'climate' and current_entity_state != 'off') else nextion.pics.button.off }}" # TEXT, BRIGHTNESS and ICON Background