Merge pull request #48 from deejaybeam/dev

fix: update statusbar on init and home-page
This commit is contained in:
Chris
2022-11-22 22:46:55 +01:00
committed by GitHub

View File

@@ -1866,7 +1866,7 @@ action:
data:
cmd: home.right_bt_pic.pic={{ right_hardware_button_state }}
###### SET Climate Symbol ######
###### StatusBar - Climate Symbol ######
- if:
- condition: template
value_template: '{{ climate |length > 0 }}'
@@ -1881,6 +1881,27 @@ action:
data:
cmd: home.icon_top_03.pic={{ top_menu_climate }}
###### StatusBar - Relay Symbols ######
- variables:
relay01_pic: >-
{%- if states(relay01_entity) == 'on' -%} {{ relay01_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
relay02_pic: >-
{%- if states(relay02_entity) == 'on' -%} {{ relay02_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_01.pic={{ relay01_pic }}
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_02.pic={{ relay02_pic }}
##### NSPanel boot init finished #####
- delay:
milliseconds: "{{ delay_value }}"
@@ -3159,7 +3180,43 @@ action:
data:
cmd: home.right_bt_pic.pic={{ right_hardware_button_state }}
##### apply climate temperature if climate_optimistic #####
###### StatusBar - Climate Symbol ######
- if:
- condition: template
value_template: '{{ climate |length > 0 }}'
then:
- variables:
top_menu_climate: >-
{%- if states(climate) == "heat" and state_attr(climate, "hvac_action") != None and state_attr(climate, "hvac_action") == "heating" -%} {{ heat_pic_on }}
{%- elif states(climate) == "heat" -%} {{ thermostat_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_03.pic={{ top_menu_climate }}
###### StatusBar - Relay Symbols ######
- variables:
relay01_pic: >-
{%- if states(relay01_entity) == 'on' -%} {{ relay01_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
relay02_pic: >-
{%- if states(relay02_entity) == 'on' -%} {{ relay02_pic_on }}
{%- else -%} {{ top_menu_blank }}
{%- endif -%}
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_01.pic={{ relay01_pic }}
- delay:
milliseconds: "{{ delay_value }}"
- service: "{{ command_printf }}"
data:
cmd: home.icon_top_02.pic={{ relay02_pic }}
##### climate-page left - apply climate temperature if climate_optimistic #####
- if:
- condition: template
value_template: '{{ trigger.event.data.old_state.state == page_climate }}'