diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 688d5ab..ace9f13 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -187,14 +187,48 @@ The goal was to create a version that allows everyone to use the NSpanel fully l domain: - sensor - humidity: - name: Humidity Sensor (Optional) - description: '* *Choose your humidity sensor*' + home_value01: + name: VALUE Home Page Sensor 1 (Optional) + description: '* *Choose your sensor*' default: [] selector: entity: domain: - sensor + home_value01_icon: + name: ICON Home Page Sensor 1 (Optional) + description: '* *Entity icon - sets an icon for the entity (e.g.: ) - if not set, no icon is shown*' + default: [] + selector: + text: {} + home_value02: + name: VALUE Home Page Sensor 2 (Optional) + description: '* *Choose your sensor*' + default: [] + selector: + entity: + domain: + - sensor + home_value02_icon: + name: ICON Home Page Sensor 2 (Optional) + description: '* *Entity icon - sets an icon for the entity (e.g.: ) - if not set, no icon is shown*' + default: [] + selector: + text: {} + home_value03: + name: VALUE Home Page Sensor 3 (Optional) + description: '* *Choose your sensor*' + default: [] + selector: + entity: + domain: + - sensor + home_value03_icon: + name: ICON Home Page Sensor 3 (Optional) + description: '* *Entity icon - sets an icon for the entity (e.g.: ) - if not set, no icon is shown*' + default: [] + selector: + text: {} hotwatertemp: name: Hot Water Temperature Sensor (Optional) description: '* *Choose your hot water sensor*' @@ -2328,7 +2362,12 @@ variables: tft_path: !input "tft_path" ##### GENERAL ENTITYS ##### - humidity: !input "humidity" + home_value01: !input "home_value01" + home_value01_icon: !input "home_value01_icon" + home_value02: !input "home_value02" + home_value02_icon: !input "home_value02_icon" + home_value03: !input "home_value03" + home_value03_icon: !input "home_value03_icon" hotwatertemp: !input "hotwatertemp" outdoortemp: !input "outdoortemp" indoortemp: !input "indoortemp" @@ -2438,6 +2477,10 @@ variables: button_icon_color_1: "33808" #Grey light button_icon_color_2: "1055" #Blue button_icon_color_3: "63488" #Red + + ###### "Weather" NEXTION FONT ICON MAPPING ##### + home_indoor_temp_icon: "" #E50E + ###### "BUTTON" NEXTION FONT ICON MAPPING ##### button_icon_unknown: "" #E027 button_icon_light: "" #E334 @@ -2454,7 +2497,7 @@ variables: button_icon_fan: "" #E20F button_icon_climate: "" #E392 - ###### "BUTTON" NEXTION FONT ICON MAPPING ##### + ###### "Weather" NEXTION FONT ICON MAPPING ##### weather_icon_blank: "" #blank weather_icon_rain: "" #E595 weather_icon_sun: "" #E5A7 @@ -2463,7 +2506,6 @@ variables: weather_icon_wind: "" #E59C - ##### CHANGE ME END ########################################################################################################## ###### NEXTION PAGE MAPPING ##### @@ -3247,12 +3289,26 @@ trigger: entity_id: '{{ weather_entity }}' id: weather_state_change - ##### Humidity - Trigger "humidity_state" ##### + ##### HOME Value 01 - Trigger "home_value01_state" ##### - platform: event event_type: state_changed event_data: - entity_id: !input "humidity" - id: humidity_state + entity_id: !input "home_value01" + id: home_value01_state + + ##### HOME Value 02 - Trigger "home_value02_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "home_value02" + id: home_value02_state + + ##### HOME Value 03 - Trigger "home_value03_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "home_value01" + id: home_value03_state ##### Climate - Trigger "climate_state" ##### - platform: event @@ -5106,17 +5162,41 @@ action: component: home.date message: "{{ date01_mui }}" - ##### Humidity ##### + ##### Home Value 01 ##### - conditions: - condition: trigger - id: humidity_state + id: home_value01_state - condition: template value_template: "{{ trigger.event.data.new_state.state != 'unavailable' }}" sequence: - service: "{{ command_text_printf }}" data: - component: home.humidity_state - message: "{{ trigger.event.data.new_state.state |round(0) }}%" + component: home.value01_state + message: '{{ trigger.event.data.new_state.state |round(1) }}' + + ##### Home Value 02 ##### + - conditions: + - condition: trigger + id: home_value02_state + - condition: template + value_template: "{{ trigger.event.data.new_state.state != 'unavailable' }}" + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.value02_state + message: '{{ trigger.event.data.new_state.state |round(1) }}' + + ##### Home Value 03 ##### + - conditions: + - condition: trigger + id: home_value03_state + - condition: template + value_template: "{{ trigger.event.data.new_state.state != 'unavailable' }}" + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.value03_state + message: '{{ trigger.event.data.new_state.state |round(1) }}' ##### Hotwater Temp ##### - conditions: @@ -5280,45 +5360,77 @@ action: component: home.time message: "{{ time }}" - ##### NSPanel Humidity ##### + ##### NSPanel Home Value 01 ##### - if: - condition: template - value_template: '{{ humidity is match "sensor." and states(humidity).state != "unavailable" }}' + value_template: '{{ home_value01_icon |length > 0 }}' then: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: home.humidity_pic.pic={{ humidity_pic_on }} - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: - component: home.humidity_state - message: "{{ states(humidity) |round(0) }}%" + component: home.value01_icon + message: "{{ home_value01_icon }}" + - if: + - condition: template + value_template: '{{ home_value01 is match "sensor." and states(home_value01).state != "unavailable" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.value01_state + message: '{{ states(home_value01) |round(1) }}{{ state_attr(home_value01, "unit_of_measurement") }}' - ##### NSPanel Hotwater ##### + ##### NSPanel Home Value 02 ##### - if: - condition: template - value_template: '{{ hotwatertemp is match "sensor." and states(hotwatertemp).state != "unavailable" }}' + value_template: '{{ home_value02_icon |length > 0 }}' then: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: home.hotwater_pic.pic={{ hotwater_pic_on }} - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: - component: home.hotwater_temp - message: "{{ states(hotwatertemp) |round(1) }}°" + component: home.value02_icon + message: "{{ home_value02_icon }}" + - if: + - condition: template + value_template: '{{ home_value02 is match "sensor." and states(home_value02).state != "unavailable" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.value02_state + message: '{{ states(home_value02) |round(1) }}{{ state_attr(home_value02, "unit_of_measurement") }}' + + ##### NSPanel Home Value 03 ##### + - if: + - condition: template + value_template: '{{ home_value03_icon |length > 0 }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.value03_icon + message: "{{ home_value03_icon }}" + - if: + - condition: template + value_template: '{{ home_value03 is match "sensor." and states(home_value03).state != "unavailable" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.value03_state + message: '{{ states(home_value03) |round(1) }}{{ state_attr(home_value03, "unit_of_measurement") }}' ##### NSPanel Outdoor Temp ##### - variables: outdoor_temp: >- - {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }} - {%- elif state_attr(weather_entity, "temperature") != None -%} {{state_attr(weather_entity,"temperature") | round(0)}} + {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(1) }} + {%- elif state_attr(weather_entity, "temperature") != None -%} {{state_attr(weather_entity,"temperature") | round(1)}} {%- else -%} 0 {%- endif -%} - delay: @@ -5336,6 +5448,12 @@ action: {%- endif -%} - delay: milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.indoortempicon + message: "{{ home_indoor_temp_icon }}" + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.current_temp