Fix first button not responding to short press (#603)
This commit is contained in:
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user