Fix for slow response with "Loading..."
- Fix the error where a missing/invalid entity causes the panel to slow down when opening a new page or keeps with "Loading..." on the screen until it timeouts. This will probably fix #493
This commit is contained in:
@@ -5184,7 +5184,7 @@ action:
|
|||||||
then:
|
then:
|
||||||
- variables:
|
- variables:
|
||||||
### component_to_update: "{{ repeat.item.button }}"
|
### component_to_update: "{{ repeat.item.button }}"
|
||||||
current_entity_state: "{{ states[repeat.item.entity].state }}"
|
current_entity_state: "{{ states(repeat.item.entity) }}"
|
||||||
# Button PIC GRAY/WHITE
|
# Button PIC GRAY/WHITE
|
||||||
btn_pic: >-
|
btn_pic: >-
|
||||||
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
||||||
@@ -5435,7 +5435,7 @@ action:
|
|||||||
then:
|
then:
|
||||||
- variables:
|
- variables:
|
||||||
### component_to_update: "{{ repeat.item.button }}"
|
### component_to_update: "{{ repeat.item.button }}"
|
||||||
current_entity_state: "{{ states[repeat.item.entity].state }}"
|
current_entity_state: "{{ states(repeat.item.entity) }}"
|
||||||
# Button PIC GRAY/WHITE
|
# Button PIC GRAY/WHITE
|
||||||
btn_pic: >-
|
btn_pic: >-
|
||||||
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
||||||
@@ -5686,7 +5686,7 @@ action:
|
|||||||
then:
|
then:
|
||||||
- variables:
|
- variables:
|
||||||
### component_to_update: "{{ repeat.item.button }}"
|
### component_to_update: "{{ repeat.item.button }}"
|
||||||
current_entity_state: "{{ states[repeat.item.entity].state }}"
|
current_entity_state: "{{ states(repeat.item.entity) }}"
|
||||||
# Button PIC GRAY/WHITE
|
# Button PIC GRAY/WHITE
|
||||||
btn_pic: >-
|
btn_pic: >-
|
||||||
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
||||||
@@ -5937,7 +5937,7 @@ action:
|
|||||||
then:
|
then:
|
||||||
- variables:
|
- variables:
|
||||||
### component_to_update: "{{ repeat.item.button }}"
|
### component_to_update: "{{ repeat.item.button }}"
|
||||||
current_entity_state: "{{ states[repeat.item.entity].state }}"
|
current_entity_state: "{{ states(repeat.item.entity) }}"
|
||||||
# Button PIC GRAY/WHITE
|
# Button PIC GRAY/WHITE
|
||||||
btn_pic: >-
|
btn_pic: >-
|
||||||
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
{%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} {{ button_off }}
|
||||||
|
|||||||
Reference in New Issue
Block a user