diff --git a/blueprint.yaml b/blueprint.yaml index 3b2b5f9..73e8260 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" @@ -928,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" @@ -1128,6 +1134,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" }}' @@ -1490,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 @@ -1846,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: @@ -1856,7 +1890,7 @@ action: message: " " - #### TFT Upload Automation ##### DONE + #### TFT Upload Automation ##### - conditions: - condition: trigger id: tft_upload @@ -1867,7 +1901,7 @@ action: data: {} - ##### Update Button Page and Lightsettings / Coversettings Page ##### DONE + ##### Update Button Page and Lightsettings / Coversettings Page ##### - conditions: - condition: trigger id: @@ -2270,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 @@ -2325,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 @@ -2504,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 @@ -2574,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 @@ -2639,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 @@ -2791,7 +2825,7 @@ action: temperature: "{{ new_setpoint }}" - ##### Left button press ##### DONE + ##### Left button press ##### - conditions: - condition: trigger id: left_button_press @@ -2812,7 +2846,7 @@ action: milliseconds: "{{ delay_value }}" - ##### Left button State ##### DONE + ##### Left button State ##### - conditions: - condition: trigger id: left_button_state @@ -2832,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 @@ -2851,7 +2885,7 @@ action: entity_id: "{{ right_button_entity }}" - ##### Right button State ##### DONE + ##### Right button State ##### - conditions: - condition: trigger id: right_button_state @@ -2871,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 @@ -2889,7 +2923,7 @@ action: message: "{{ date01_mui }}" - ##### Humidity ##### DONE + ##### Humidity ##### - conditions: - condition: trigger id: humidity_state @@ -2900,7 +2934,7 @@ action: message: "{{ trigger.event.data.new_state.state |round(0) }}%" - ##### Hotwater Temp ##### DONE + ##### Hotwater Temp ##### - conditions: - condition: trigger id: hotwatertemp_state @@ -2922,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 @@ -4345,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 }}" @@ -4468,11 +4502,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 ##### @@ -4496,50 +4560,65 @@ 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 }} - #############################################################