From 4b726e0a6568ab501f5f5e2d7ae092e8cebd8c9b Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 22 Nov 2022 11:41:08 +0100 Subject: [PATCH 1/3] upd: add relay-state to top-statusbar --- blueprint.yaml | 64 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/blueprint.yaml b/blueprint.yaml index 3b2b5f9..1e5ae63 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -117,8 +117,8 @@ blueprint: - switch - input_boolean heatingsystemflame: - name: Top Menu 01 (Optional) - description: '* *Top Menu 01 is a Flame icon. When your selected sensor is on, a flame icon is displayed*' + name: Top Menu 04 (Optional) + description: '* *Top Menu 04 is a Flame icon. When your selected sensor is on, a flame icon is displayed*' default: [] selector: entity: @@ -747,6 +747,8 @@ trigger_variables: hotwatercharge: !input "hotwatercharge" heatingsystemflame: !input "heatingsystemflame" display_target_temperature: "sensor.{{ nspanel_name_trigger }}_display_target_temperature" + relay01_entity: "switch.{{ nspanel_name_trigger }}_relay_1" + relay02_entity: "switch.{{ nspanel_name_trigger }}_relay_2" ##### WEATHER Trigger ##### weather: !input "weather" @@ -810,10 +812,16 @@ variables: battery_icon: "80" light_pic_off: "96" light_pic_on: "97" - hotwater_pic_off: "60" + # hotwater_pic_off: "60" hotwater_pic_on: "61" flame_pic_on: "57" - flame_pic_off: "60" + # flame_pic_off: "60" + top_menu_blank: "60" + thermostat_pic_on: "58" + heat_pic_on: "59" + relay01_pic_on: "105" + relay02_pic_on: "106" + weather_sunny: "2" weather_cloudy: "3" @@ -1128,6 +1136,20 @@ trigger: entity_id: !input "heatingsystemflame" id: heatingsystemflame_state + ##### Relay01 - Trigger "relay01_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: '{{ relay01_entity }}' + id: relay01_state + + ##### Relay02 - Trigger "relay02_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: '{{ relay02_entity }}' + id: relay02_state + ##### Left Button - Trigger "left_button_press" ##### - platform: template value_template: '{{ states(left_button) is match "on" }}' @@ -4468,11 +4490,41 @@ action: - variables: flame_pic: >- {%- if trigger.event.data.new_state.state == 'on' -%} {{ flame_pic_on }} - {%- else -%} {{ flame_pic_off }} + {%- else -%} {{ top_menu_blank }} {%- endif -%} - service: "{{ command_printf }}" data: - cmd: home.icon_top_01.pic={{ flame_pic }} + cmd: home.icon_top_04.pic={{ flame_pic }} + + + ##### Set Relay01-Symbol ##### + - conditions: + - condition: trigger + id: relay01_state + sequence: + - variables: + relay01_pic: >- + {%- if trigger.event.data.new_state.state == 'on' -%} {{ relay01_pic_on }} + {%- else -%} {{ top_menu_blank }} + {%- endif -%} + - service: "{{ command_printf }}" + data: + cmd: home.icon_top_01.pic={{ relay01_pic }} + + + ##### Set Relay02-Symbol ##### + - conditions: + - condition: trigger + id: relay02_state + sequence: + - variables: + relay02_pic: >- + {%- if trigger.event.data.new_state.state == 'on' -%} {{ relay02_pic_on }} + {%- else -%} {{ top_menu_blank }} + {%- endif -%} + - service: "{{ command_printf }}" + data: + cmd: home.icon_top_02.pic={{ relay02_pic }} ##### Sync Hotwater Charge button-symbol ##### From 205679af0a6e9993bdeb03b255ab3d8bb94b65ea Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 22 Nov 2022 13:22:13 +0100 Subject: [PATCH 2/3] upd: climate symbol --- blueprint.yaml | 117 ++++++++++++++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 44 deletions(-) diff --git a/blueprint.yaml b/blueprint.yaml index 1e5ae63..b5e5459 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -936,8 +936,6 @@ variables: {%- endif -%} - - ##### FORCAST ACCUWEATHER - DAY 0 ##### accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather }}_realfeel_temperature_min_0d" accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather }}_realfeel_temperature_max_0d" @@ -1868,6 +1866,20 @@ action: data: cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} + ###### SET 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 }} ##### NSPanel boot init finished ##### - delay: @@ -4367,7 +4379,7 @@ action: {%- endif -%} heating_state: >- {%- if hvac_mode == "off" -%} {{ off_mui }} - {%- elif hvac_mode != "off" -%} {{ heat_mui }} + {%- elif hvac_mode != "off" -%} {{ on_mui }} {%- endif -%} - service: "{{ command_text_printf }}" @@ -4548,51 +4560,68 @@ action: - conditions: - condition: trigger id: climate_state - - condition: template - value_template: '{{ states(current_page) == page_climate }}' + # - condition: template + # value_template: '{{ states(current_page) == page_climate }}' # - condition: template # value_template: '{{ climate_optimistic == false }}' sequence: - - variables: - heating_state: >- - {%- if trigger.event.data.new_state.state == "off" -%} {{ off_mui }} - {%- elif trigger.event.data.new_state.state != "off" -%} {{ heat_mui }} - {%- endif -%} - heating_bt_pic: >- - {%- if trigger.event.data.new_state.state == "off" -%} {{ heating_bt_pic_off }} - {%- else -%} {{ heating_bt_pic_on }} - {%- endif -%} - - service: "{{ command_text_printf }}" - data: - component: current_temp - message: "{{ trigger.event.data.new_state.attributes.current_temperature | round(1)}}°" - - service: "{{ command_text_printf }}" - data: - component: heating_state - message: "{{heating_state}}" - - service: "{{ command_printf }}" - data: - cmd: heating_bt_pic.pic={{ heating_bt_pic }} - - if: - - condition: template - value_template: '{{ trigger.event.data.new_state.state != "off" }}' - then: - - service: "{{ command_thermostat_cycle }}" - data: - value: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}" - else: - - service: "{{ command_thermostat_cycle }}" - data: - value: "0" - - service: "{{ command_text_printf }}" - data: - component: target_temp - message: " " + - choose: + ### current page is climate ### + - conditions: '{{ states(current_page) == page_climate }}' + sequence: + - variables: + heating_state: >- + {%- if trigger.event.data.new_state.state == "off" -%} {{ off_mui }} + {%- elif trigger.event.data.new_state.state != "off" -%} {{ on_mui }} + {%- endif -%} + heating_bt_pic: >- + {%- if trigger.event.data.new_state.state == "off" -%} {{ heating_bt_pic_off }} + {%- else -%} {{ heating_bt_pic_on }} + {%- endif -%} + + - service: "{{ command_text_printf }}" + data: + component: current_temp + message: "{{ trigger.event.data.new_state.attributes.current_temperature | round(1)}}°" + - service: "{{ command_text_printf }}" + data: + component: heating_state + message: "{{heating_state}}" + - service: "{{ command_printf }}" + data: + cmd: heating_bt_pic.pic={{ heating_bt_pic }} + - if: + - condition: template + value_template: '{{ trigger.event.data.new_state.state != "off" }}' + then: + - service: "{{ command_thermostat_cycle }}" + data: + value: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}" + else: + - service: "{{ command_thermostat_cycle }}" + data: + value: "0" + - service: "{{ command_text_printf }}" + data: + component: target_temp + message: " " + + ### current page is home ### + - conditions: '{{ states(current_page) == page_home }}' + sequence: + - variables: + top_menu_climate: >- + {%- if trigger.event.data.new_state.state == "heat" and trigger.event.data.new_state.attributes.hvac_action is defined and trigger.event.data.new_state.attributes.hvac_action == "heating" -%} {{ heat_pic_on }} + {%- elif trigger.event.data.new_state.state == "heat" -%} {{ thermostat_pic_on }} + {%- else -%} {{ top_menu_blank }} + {%- endif -%} + - service: "{{ command_printf }}" + data: + cmd: home.icon_top_03.pic={{ top_menu_climate }} + + + - - - - ############################################################# ##### CLOSE - Action ##### From 5d3c1e238f228e8fd9117514389dcfe37935bda8 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 22 Nov 2022 13:28:25 +0100 Subject: [PATCH 3/3] upd: remove old comments --- blueprint.yaml | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/blueprint.yaml b/blueprint.yaml index b5e5459..73e8260 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -1510,10 +1510,10 @@ action: ######################################################################################################################## - # main - alias: "choose alias (name) - NEW VERSION" + # main - alias: "choose alias (name)" - choose: - ##### NSPanel boot init ##### DONE + ##### NSPanel boot init ##### - conditions: - condition: trigger id: nspanel_boot_init @@ -1890,7 +1890,7 @@ action: message: " " - #### TFT Upload Automation ##### DONE + #### TFT Upload Automation ##### - conditions: - condition: trigger id: tft_upload @@ -1901,7 +1901,7 @@ action: data: {} - ##### Update Button Page and Lightsettings / Coversettings Page ##### DONE + ##### Update Button Page and Lightsettings / Coversettings Page ##### - conditions: - condition: trigger id: @@ -2304,7 +2304,7 @@ action: message: '0 %' - ##### Page Button - SHORT Press - Toggle Enities ##### DONE + ##### Page Button - SHORT Press - Toggle Enities ##### - conditions: - condition: trigger id: short_press @@ -2359,7 +2359,7 @@ action: entity_id: "{{ entity_short }}" - ##### Page Button - LONG Press - JUMP to Page Lightsettings / Coversettings ##### DONE + ##### Page Button - LONG Press - JUMP to Page Lightsettings / Coversettings ##### - conditions: - condition: trigger id: long_press @@ -2538,7 +2538,7 @@ action: cmd: coversettings.cover_status.pic={{ cover_pic_closed }} - ##### LASTCLICK_LIGHTSETTINGS - Changes on page Light-Settings ##### DONE + ##### LASTCLICK_LIGHTSETTINGS - Changes on page Light-Settings ##### - conditions: - condition: trigger id: light_settings @@ -2608,7 +2608,7 @@ action: cmd: "{{ entity_back }}" - ##### LASTCLICK_COVERSETTINGS - Changes on page Cover-Settings ##### DONE + ##### LASTCLICK_COVERSETTINGS - Changes on page Cover-Settings ##### - conditions: - condition: trigger id: cover_settings @@ -2673,7 +2673,7 @@ action: cmd: "{{ entity_back }}" - ##### LASTCLICK_CLIMATESETTINGS - Changes on page Climate-Settings ##### DONE + ##### LASTCLICK_CLIMATESETTINGS - Changes on page Climate-Settings ##### - conditions: - condition: trigger id: climate_settings @@ -2825,7 +2825,7 @@ action: temperature: "{{ new_setpoint }}" - ##### Left button press ##### DONE + ##### Left button press ##### - conditions: - condition: trigger id: left_button_press @@ -2846,7 +2846,7 @@ action: milliseconds: "{{ delay_value }}" - ##### Left button State ##### DONE + ##### Left button State ##### - conditions: - condition: trigger id: left_button_state @@ -2866,7 +2866,7 @@ action: cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} - ##### Right button press ##### DONE + ##### Right button press ##### - conditions: - condition: trigger id: right_button_press @@ -2885,7 +2885,7 @@ action: entity_id: "{{ right_button_entity }}" - ##### Right button State ##### DONE + ##### Right button State ##### - conditions: - condition: trigger id: right_button_state @@ -2905,7 +2905,7 @@ action: cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} - ##### Date and Time Home Page ##### DONE + ##### Date and Time Home Page ##### - conditions: - condition: trigger id: time_state @@ -2923,7 +2923,7 @@ action: message: "{{ date01_mui }}" - ##### Humidity ##### DONE + ##### Humidity ##### - conditions: - condition: trigger id: humidity_state @@ -2934,7 +2934,7 @@ action: message: "{{ trigger.event.data.new_state.state |round(0) }}%" - ##### Hotwater Temp ##### DONE + ##### Hotwater Temp ##### - conditions: - condition: trigger id: hotwatertemp_state @@ -2956,7 +2956,7 @@ action: cmd: home.hotwater_pic.pic={{ hotwater_pic_on }} - ##### Outdoor Temp Entity ##### DONE + ##### Outdoor Temp Entity ##### - conditions: - condition: trigger id: outdoortemp_state @@ -4620,8 +4620,6 @@ action: cmd: home.icon_top_03.pic={{ top_menu_climate }} - - ############################################################# ##### CLOSE - Action #####