From 2a5f3124d5718f1b8cd23b52dc1f29cdad912161 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Wed, 5 Apr 2023 02:04:12 +0200 Subject: [PATCH] Fix first button not responding to short press (#603) --- nspanel_blueprint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 678ef1b..dd9f276 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -5073,7 +5073,7 @@ action: last_click_state: "{{ states(last_click) | default('unavailable') if last_click is string else 'unavailable' }}" last_click_coordinates: "{{ last_click_state.replace('releasebuttonpage', '').split('button') if last_click_state not in ['unavailable', 'unknown', None] else [-1, -1] }}" last_click_entity_index: "{{ (last_click_coordinates[0] | int(-99) -1)*8 + last_click_coordinates[1] | int(-99) - 1 }}" - - condition: "{{ last_click_entity_index > 0 }}" + - condition: "{{ last_click_entity_index >= 0 }}" - variables: last_click_button: "{{ button_pages_buttons[last_click_entity_index] | default([]) }}" entity_short: "{{ last_click_button.entity | default('unavailable') if last_click_button and last_click_button.entity is defined }}"