From 491b5cb23e3fa15947970fe27c2714e4f82853d6 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 10 Jan 2023 17:46:50 +0100 Subject: [PATCH] upd: weather-entity, new boot-process --- nspanel_blueprint.yaml | 789 ++++++++++++++++------------------------- nspanel_esphome.yaml | 17 +- 2 files changed, 303 insertions(+), 503 deletions(-) diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index d7e65a7..981fb9d 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -156,12 +156,14 @@ The goal was to create a version that allows everyone to use the NSpanel fully l options: - Default - AccuWeather - accuweather: - name: Name assigned to the AccuWeather Integration (Optional) - description: '* *If you use Accuweather Integration, the name of the Accuweather Integration must be entered here. ATTENTION! You must enter the name as specified in the entity. Example: Name of Accuweather is **"Home Weather"** then please write **"home_weather"** in the field*' + weather_entity: + name: Weather entity from HA + description: '* *Select your weather entity.*' default: [] selector: - text: {} + entity: + domain: + - weather ##### GENERAL ENTITYS ##### outdoortemp: @@ -1268,6 +1270,8 @@ The goal was to create a version that allows everyone to use the NSpanel fully l mode: parallel max: 5000 +trace: + stored_traces: 20 ############################################################# ##### CLOSE - INPUT ##### @@ -1304,13 +1308,8 @@ trigger_variables: ##### WEATHER Trigger ##### weather: !input "weather" - ha_weather: "weather.home" - accuweather: !input "accuweather" - accuweather_value: "weather.{{ accuweather }}" - weather_entity: >- - {%- if weather == "Default" -%} {{ ha_weather }} - {%- elif weather == "AccuWeather" -%} {{ accuweather_value }} - {%- endif -%} + weather_entity: !input "weather_entity" + accuweather_name: '{{ weather_entity |replace("weather.","") }}' variables: ##### GENERAL ##### @@ -1330,6 +1329,7 @@ variables: command_thermostat_cycle: "esphome.{{ nspanel_name }}_send_thermostat_cycle_state" command_notification_show: "esphome.{{ nspanel_name }}_notification_show" command_notification_clear: "esphome.{{ nspanel_name }}_notification_clear" + command_play_rtttl: "esphome.{{ nspanel_name }}_play_rtttl" ###### SYNC SETTINGS ##### delay_boot: !input "delay" @@ -1576,7 +1576,7 @@ variables: {%- elif language == "RUS" -%} {{ ((as_timestamp(now()) + 259200) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Понедельник,')| replace('Tue', 'Вторник,')| replace('Wed', 'Среда,')| replace('Thu', 'Четверг,')| replace('Fri', 'Пятница,')| replace('Sat', 'Суббота,')| replace('Sun', 'Воскресение,') }} {%- endif -%} date05_mui: >- - {%- if language == "DE" -%} {{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }} + {%- if language == "DEU" -%} {{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }} {%- elif language == "ENG" -%} {{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }} {%- elif language == "BGR" -%} {{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Понеделник,')| replace('Tue', 'Вторник,')| replace('Wed', 'Сряда,')| replace('Thu', 'Четвъртък,')| replace('Fri', 'Петък,')| replace('Sat', 'Събота,')| replace('Sun', 'Неделя,') }} {%- elif language == "DNK" -%} {{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Mandag,')| replace('Tue', 'Tirsdag,')| replace('Wed', 'Onsdag,')| replace('Thu', 'Torsdag,')| replace('Fri', 'Fredag,')| replace('Sat', 'Lørdag,')| replace('Sun', 'Søndag,') }} @@ -1858,50 +1858,50 @@ variables: ##### 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" - accuweather_hours_of_sun_0d: "sensor.{{ accuweather }}_hours_of_sun_0d" - accuweather_uv_index_0d: "sensor.{{ accuweather }}_uv_index_0d" - accuweather_thunderstorm_probability_day_0d: "sensor.{{ accuweather }}_thunderstorm_probability_day_0d" - accuweather_thunderstorm_probability_night_0d: "sensor.{{ accuweather }}_thunderstorm_probability_night_0d" - accuweather_wind_day_0d: "sensor.{{ accuweather }}_wind_day_0d" - accuweather_wind_night_0d: "sensor.{{ accuweather }}_wind_night_0d" + accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_0d" + accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_0d" + accuweather_hours_of_sun_0d: "sensor.{{ accuweather_name }}_hours_of_sun_0d" + accuweather_uv_index_0d: "sensor.{{ accuweather_name }}_uv_index_0d" + accuweather_thunderstorm_probability_day_0d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_0d" + accuweather_thunderstorm_probability_night_0d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_0d" + accuweather_wind_day_0d: "sensor.{{ accuweather_name }}_wind_day_0d" + accuweather_wind_night_0d: "sensor.{{ accuweather_name }}_wind_night_0d" ##### FORCAST ACCUWEATHER - DAY 1 ##### - accuweather_realfeel_temperature_min_1d: "sensor.{{ accuweather }}_realfeel_temperature_min_1d" - accuweather_realfeel_temperature_max_1d: "sensor.{{ accuweather }}_realfeel_temperature_max_1d" - accuweather_hours_of_sun_1d: "sensor.{{ accuweather }}_hours_of_sun_1d" - accuweather_uv_index_1d: "sensor.{{ accuweather }}_uv_index_1d" - accuweather_thunderstorm_probability_day_1d: "sensor.{{ accuweather }}_thunderstorm_probability_day_1d" - accuweather_thunderstorm_probability_night_1d: "sensor.{{ accuweather }}_thunderstorm_probability_night_1d" - accuweather_wind_day_1d: "sensor.{{ accuweather }}_wind_day_1d" - accuweather_wind_night_1d: "sensor.{{ accuweather }}_wind_night_1d" + accuweather_realfeel_temperature_min_1d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_1d" + accuweather_realfeel_temperature_max_1d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_1d" + accuweather_hours_of_sun_1d: "sensor.{{ accuweather_name }}_hours_of_sun_1d" + accuweather_uv_index_1d: "sensor.{{ accuweather_name }}_uv_index_1d" + accuweather_thunderstorm_probability_day_1d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_1d" + accuweather_thunderstorm_probability_night_1d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_1d" + accuweather_wind_day_1d: "sensor.{{ accuweather_name }}_wind_day_1d" + accuweather_wind_night_1d: "sensor.{{ accuweather_name }}_wind_night_1d" ##### FORCAST ACCUWEATHER - DAY 2 ##### - accuweather_realfeel_temperature_min_2d: "sensor.{{ accuweather }}_realfeel_temperature_min_2d" - accuweather_realfeel_temperature_max_2d: "sensor.{{ accuweather }}_realfeel_temperature_max_2d" - accuweather_hours_of_sun_2d: "sensor.{{ accuweather }}_hours_of_sun_2d" - accuweather_uv_index_2d: "sensor.{{ accuweather }}_uv_index_2d" - accuweather_thunderstorm_probability_day_2d: "sensor.{{ accuweather }}_thunderstorm_probability_day_2d" - accuweather_thunderstorm_probability_night_2d: "sensor.{{ accuweather }}_thunderstorm_probability_night_2d" - accuweather_wind_day_2d: "sensor.{{ accuweather }}_wind_day_2d" - accuweather_wind_night_2d: "sensor.{{ accuweather }}_wind_night_2d" + accuweather_realfeel_temperature_min_2d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_2d" + accuweather_realfeel_temperature_max_2d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_2d" + accuweather_hours_of_sun_2d: "sensor.{{ accuweather_name }}_hours_of_sun_2d" + accuweather_uv_index_2d: "sensor.{{ accuweather_name }}_uv_index_2d" + accuweather_thunderstorm_probability_day_2d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_2d" + accuweather_thunderstorm_probability_night_2d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_2d" + accuweather_wind_day_2d: "sensor.{{ accuweather_name }}_wind_day_2d" + accuweather_wind_night_2d: "sensor.{{ accuweather_name }}_wind_night_2d" ##### FORCAST ACCUWEATHER - DAY 3 ##### - accuweather_realfeel_temperature_min_3d: "sensor.{{ accuweather }}_realfeel_temperature_min_3d" - accuweather_realfeel_temperature_max_3d: "sensor.{{ accuweather }}_realfeel_temperature_max_3d" - accuweather_hours_of_sun_3d: "sensor.{{ accuweather }}_hours_of_sun_3d" - accuweather_uv_index_3d: "sensor.{{ accuweather }}_uv_index_3d" - accuweather_thunderstorm_probability_day_3d: "sensor.{{ accuweather }}_thunderstorm_probability_day_3d" - accuweather_thunderstorm_probability_night_3d: "sensor.{{ accuweather }}_thunderstorm_probability_night_3d" - accuweather_wind_day_3d: "sensor.{{ accuweather }}_wind_day_3d" - accuweather_wind_night_3d: "sensor.{{ accuweather }}_wind_night_3d" + accuweather_realfeel_temperature_min_3d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_3d" + accuweather_realfeel_temperature_max_3d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_3d" + accuweather_hours_of_sun_3d: "sensor.{{ accuweather_name }}_hours_of_sun_3d" + accuweather_uv_index_3d: "sensor.{{ accuweather_name }}_uv_index_3d" + accuweather_thunderstorm_probability_day_3d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_3d" + accuweather_thunderstorm_probability_night_3d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_3d" + accuweather_wind_day_3d: "sensor.{{ accuweather_name }}_wind_day_3d" + accuweather_wind_night_3d: "sensor.{{ accuweather_name }}_wind_night_3d" ##### FORCAST ACCUWEATHER - DAY 4 ##### - accuweather_realfeel_temperature_min_4d: "sensor.{{ accuweather }}_realfeel_temperature_min_4d" - accuweather_realfeel_temperature_max_4d: "sensor.{{ accuweather }}_realfeel_temperature_max_4d" - accuweather_hours_of_sun_4d: "sensor.{{ accuweather }}_hours_of_sun_4d" - accuweather_uv_index_4d: "sensor.{{ accuweather }}_uv_index_4d" - accuweather_thunderstorm_probability_day_4d: "sensor.{{ accuweather }}_thunderstorm_probability_day_4d" - accuweather_thunderstorm_probability_night_4d: "sensor.{{ accuweather }}_thunderstorm_probability_night_4d" - accuweather_wind_day_4d: "sensor.{{ accuweather }}_wind_day_4d" - accuweather_wind_night_4d: "sensor.{{ accuweather }}_wind_night_4d" + accuweather_realfeel_temperature_min_4d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_4d" + accuweather_realfeel_temperature_max_4d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_4d" + accuweather_hours_of_sun_4d: "sensor.{{ accuweather_name }}_hours_of_sun_4d" + accuweather_uv_index_4d: "sensor.{{ accuweather_name }}_uv_index_4d" + accuweather_thunderstorm_probability_day_4d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_4d" + accuweather_thunderstorm_probability_night_4d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_4d" + accuweather_wind_day_4d: "sensor.{{ accuweather_name }}_wind_day_4d" + accuweather_wind_night_4d: "sensor.{{ accuweather_name }}_wind_night_4d" ##### BUTTON Page Labels ##### button_page01_label: !input button_page01_label @@ -2527,18 +2527,6 @@ action: ##### NSPanel boot init start ##### - delay: milliseconds: 100 - - service: "{{ command_text_printf }}" - data: - component: home.loading - message: "Loading - PLS WAIT!" - - ##### NSPanel boot init Date ##### - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: home.date - message: "{{ date01_mui }}" ##### NSPanel boot init buttons ##### - delay: @@ -2754,205 +2742,20 @@ action: component: "{{ component_to_update }}bri" message: "{{ btn_bri_txt }}" - ##### NSPanel boot init - Time ##### + ###### INIT Notify ###### + - service: "{{ command_notification_clear }}" + data: {} + + ###### NSPanel beep ###### - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: home.time - message: "{{ time }}" - - ##### NSPanel boot init - Humidity ##### + milliseconds: 100 - if: - condition: template - value_template: '{{ humidity is match "sensor." and states(humidity).state != "unavailable" }}' + value_template: '{{ is_state(notification_sound, "on") }}' then: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" + - service: "{{ command_play_rtttl }}" 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) }}%" - - ##### NSPanel boot init - Hotwater ##### - - if: - - condition: template - value_template: '{{ hotwatertemp is match "sensor." and states(hotwatertemp).state != "unavailable" }}' - 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) }}°" - - ##### NSPanel boot init - Outdoor Temp ##### - - variables: - outdoor_temp: >- - {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }} - {%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}} - {%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}} - {%- endif -%} - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: home.outdoor_temp - message: "{{ outdoor_temp }}°" - - ##### NSPanel boot init - Indoor Temp ##### - - variables: - indoor_temp: >- - {%- if indoortemp is match "sensor." and states(indoortemp).state != "unavailable" -%} {{ states(indoortemp) |round(1) }} - {%- else -%} {{ states(nspaneltemp) |round(1) }} - {%- endif -%} - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: home.current_temp - message: "{{ indoor_temp }}°" - - ##### Weather Icon Home Page - - variables: - weather_pic: >- - {%- if states(weather_entity) == 'sunny' -%} {{ weather_sunny }} - {%- elif states(weather_entity) == 'cloudy' -%} {{ weather_cloudy }} - {%- elif states(weather_entity) == 'rainy' -%} {{ weather_rainy }} - {%- elif states(weather_entity) == 'pouring' -%} {{ weather_pouring }} - {%- elif states(weather_entity) == 'snowy' -%} {{ weather_snowy }} - {%- elif states(weather_entity) == 'hail' -%} {{ weather_hail }} - {%- elif states(weather_entity) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif states(weather_entity) == 'fog' -%} {{ weather_fog }} - {%- elif states(weather_entity) == 'windy' -%} {{ weather_windy }} - {%- elif states(weather_entity) == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif states(weather_entity) == 'lightning' -%} {{ weather_lightning }} - {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} - {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} - {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} - {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} - {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} - {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} - {%- elif states(weather_entity) == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: home.weather.pic={{ weather_pic }} - - ##### NSPanel boot init - Left Button Name ##### - - if: - - condition: template - value_template: '{{ left_button_name |length > 0 }}' - then: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: home.left_bt_text - message: "{{ left_button_name }}" - - ##### SET Left Hardware Button PIC on Home Page #### - - if: - - condition: template - value_template: '{{ left_button_entity |length > 0 and states(left_button_entity).state != "unavailable" }}' - then: - - variables: - # Hardware Button PIC - left_hardware_button_state: >- - {%- if states(left_button_entity) == 'off' -%} {{ hardware_button_pic_off }} - {%- elif states(left_button_entity) == 'on' -%} {{ hardware_button_pic_on }} - {%- endif -%} - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} - - ##### NSPanel boot init - Right Button Name ##### - - if: - - condition: template - value_template: '{{ right_button_name |length > 0 }}' - then: - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: home.right_bt_text - message: "{{ right_button_name }}" - - ###### SET Right Hardware Button PIC on Home Page ##### - - if: - - condition: template - value_template: '{{ right_button_entity |length > 0 and states(right_button_entity).state != "unavailable" }}' - then: - - variables: - # Hardware Button PIC - right_hardware_button_state: >- - {%- if states(right_button_entity) == 'off' -%} {{ hardware_button_pic_off }} - {%- elif states(right_button_entity) == 'on' -%} {{ hardware_button_pic_on }} - {%- endif -%} - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} - - ###### 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 }} - - ##### NSPanel boot init finished ##### - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: home.loading - message: " " + song_str: "two short:d=4,o=5,b=100:16e6,16e6" ##### NSPanel boot init finished and jump to Home Page##### - delay: @@ -2960,28 +2763,7 @@ action: - service: "{{ command_printf }}" data: cmd: page home - - - - ###### StatusBar - Icon 04 ###### - - if: - - condition: template - value_template: '{{ heatingsystemflame |length > 0 }}' - then: - - variables: - flame_pic: >- - {%- if states(heatingsystemflame) == "on" -%} {{ flame_pic_on }} - {%- else -%} {{ top_menu_blank }} - {%- endif -%} - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_printf }}" - data: - cmd: home.icon_top_04.pic={{ flame_pic }} - - ###### INIT Notify ###### - - service: "{{ command_notification_clear }}" - data: {} + #### Notification Symbol #### - conditions: @@ -3064,7 +2846,6 @@ action: - service: "{{ tft_upload }}" data: {} - ##### Update Button Page and Lightsettings / Coversettings Page ##### - conditions: - condition: trigger @@ -3106,8 +2887,41 @@ action: sequence: - alias: "Set variable(s) for entity change" variables: + buttonpage: '{{ states(current_page) }}' component_to_update: >- - {%- if trigger.entity_id == entity01 -%} buttonpage01.button01 + {%- if trigger.entity_id == entity01 and buttonpage == 'buttonpage01' -%} buttonpage01.button01 + {%- elif trigger.entity_id == entity02 and buttonpage == 'buttonpage01' -%} buttonpage01.button02 + {%- elif trigger.entity_id == entity03 and buttonpage == 'buttonpage01' -%} buttonpage01.button03 + {%- elif trigger.entity_id == entity04 and buttonpage == 'buttonpage01' -%} buttonpage01.button04 + {%- elif trigger.entity_id == entity05 and buttonpage == 'buttonpage01' -%} buttonpage01.button05 + {%- elif trigger.entity_id == entity06 and buttonpage == 'buttonpage01' -%} buttonpage01.button06 + {%- elif trigger.entity_id == entity07 and buttonpage == 'buttonpage01' -%} buttonpage01.button07 + {%- elif trigger.entity_id == entity08 and buttonpage == 'buttonpage01' -%} buttonpage01.button08 + {%- elif trigger.entity_id == entity09 and buttonpage == 'buttonpage02' -%} buttonpage02.button01 + {%- elif trigger.entity_id == entity10 and buttonpage == 'buttonpage02' -%} buttonpage02.button02 + {%- elif trigger.entity_id == entity11 and buttonpage == 'buttonpage02' -%} buttonpage02.button03 + {%- elif trigger.entity_id == entity12 and buttonpage == 'buttonpage02' -%} buttonpage02.button04 + {%- elif trigger.entity_id == entity13 and buttonpage == 'buttonpage02' -%} buttonpage02.button05 + {%- elif trigger.entity_id == entity14 and buttonpage == 'buttonpage02' -%} buttonpage02.button06 + {%- elif trigger.entity_id == entity15 and buttonpage == 'buttonpage02' -%} buttonpage02.button07 + {%- elif trigger.entity_id == entity16 and buttonpage == 'buttonpage02' -%} buttonpage02.button08 + {%- elif trigger.entity_id == entity17 and buttonpage == 'buttonpage03' -%} buttonpage03.button01 + {%- elif trigger.entity_id == entity18 and buttonpage == 'buttonpage03' -%} buttonpage03.button02 + {%- elif trigger.entity_id == entity19 and buttonpage == 'buttonpage03' -%} buttonpage03.button03 + {%- elif trigger.entity_id == entity20 and buttonpage == 'buttonpage03' -%} buttonpage03.button04 + {%- elif trigger.entity_id == entity21 and buttonpage == 'buttonpage03' -%} buttonpage03.button05 + {%- elif trigger.entity_id == entity22 and buttonpage == 'buttonpage03' -%} buttonpage03.button06 + {%- elif trigger.entity_id == entity23 and buttonpage == 'buttonpage03' -%} buttonpage03.button07 + {%- elif trigger.entity_id == entity24 and buttonpage == 'buttonpage03' -%} buttonpage03.button08 + {%- elif trigger.entity_id == entity25 and buttonpage == 'buttonpage04' -%} buttonpage04.button01 + {%- elif trigger.entity_id == entity26 and buttonpage == 'buttonpage04' -%} buttonpage04.button02 + {%- elif trigger.entity_id == entity27 and buttonpage == 'buttonpage04' -%} buttonpage04.button03 + {%- elif trigger.entity_id == entity28 and buttonpage == 'buttonpage04' -%} buttonpage04.button04 + {%- elif trigger.entity_id == entity29 and buttonpage == 'buttonpage04' -%} buttonpage04.button05 + {%- elif trigger.entity_id == entity30 and buttonpage == 'buttonpage04' -%} buttonpage04.button06 + {%- elif trigger.entity_id == entity31 and buttonpage == 'buttonpage04' -%} buttonpage04.button07 + {%- elif trigger.entity_id == entity32 and buttonpage == 'buttonpage04' -%} buttonpage04.button08 + {%- elif trigger.entity_id == entity01 -%} buttonpage01.button01 {%- elif trigger.entity_id == entity02 -%} buttonpage01.button02 {%- elif trigger.entity_id == entity03 -%} buttonpage01.button03 {%- elif trigger.entity_id == entity04 -%} buttonpage01.button04 @@ -3531,7 +3345,6 @@ action: component: coversettings.cover_value message: '0 %' - ##### Page Button - SHORT Press - Toggle Enities ##### - conditions: - condition: trigger @@ -3611,7 +3424,6 @@ action: value_template: '{{ entity_short is not match "person." and entity_short is not match "binary_sensor." }}' - if: - condition: template - #value_template: "{{ is_state(confirmation_message, 'on') }}" ####### TESTING ?? ########## - Replace with Confirm boolean for this entity value_template: "{{ entity_confirm }}" then: - variables: @@ -3721,7 +3533,6 @@ action: data: entity_id: "{{ entity_short }}" - ##### Page Button - LONG Press - JUMP to Page Lightsettings / Coversettings ##### - conditions: - condition: trigger @@ -3900,7 +3711,6 @@ action: data: cmd: coversettings.cover_status.pic={{ cover_pic_closed }} - ##### LASTCLICK_LIGHTSETTINGS - Changes on page Light-Settings ##### - conditions: - condition: trigger @@ -3970,7 +3780,6 @@ action: data: cmd: "{{ entity_back }}" - ##### LASTCLICK_COVERSETTINGS - Changes on page Cover-Settings ##### - conditions: - condition: trigger @@ -4035,7 +3844,6 @@ action: data: cmd: "{{ entity_back }}" - ##### LASTCLICK_CLIMATESETTINGS - Changes on page Climate-Settings ##### - conditions: - condition: trigger @@ -4187,7 +3995,6 @@ action: #hvac_mode: 'heat' temperature: "{{ new_setpoint }}" - ##### Left button press ##### - conditions: - condition: trigger @@ -4218,7 +4025,6 @@ action: - delay: milliseconds: "{{ delay_value }}" - ##### Left button State ##### - conditions: - condition: trigger @@ -4238,7 +4044,6 @@ action: data: cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} - ##### Right button press ##### - conditions: - condition: trigger @@ -4267,7 +4072,6 @@ action: data: entity_id: "{{ right_button_entity }}" - ##### Right button State ##### - conditions: - condition: trigger @@ -4287,7 +4091,6 @@ action: data: cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} - ##### Date and Time Home Page ##### - conditions: - condition: trigger @@ -4305,7 +4108,6 @@ action: component: home.date message: "{{ date01_mui }}" - ##### Humidity ##### - conditions: - condition: trigger @@ -4318,7 +4120,6 @@ action: component: home.humidity_state message: "{{ trigger.event.data.new_state.state |round(0) }}%" - ##### Hotwater Temp ##### - conditions: - condition: trigger @@ -4342,7 +4143,6 @@ action: data: cmd: home.hotwater_pic.pic={{ hotwater_pic_on }} - ##### Outdoor Temp Entity ##### - conditions: - condition: trigger @@ -4361,7 +4161,6 @@ action: component: climate.outdoor_temp message: "{{ trigger.event.data.new_state.state |round(0) }}°" - ##### Indoor Temp Entity ##### - conditions: - condition: trigger @@ -4390,7 +4189,6 @@ action: component: home.current_temp message: "{{ trigger.event.data.new_state.state |round(1) }}°" - ##### Weather state change update ##### - conditions: - condition: trigger @@ -4461,7 +4259,7 @@ action: component: home.time message: "{{ time }}" - ##### NSPanel Humidity ##### + ##### NSPanel Humidity ##### - if: - condition: template value_template: '{{ humidity is match "sensor." and states(humidity).state != "unavailable" }}' @@ -4478,7 +4276,7 @@ action: component: home.humidity_state message: "{{ states(humidity) |round(0) }}%" - ##### NSPanel Hotwater ##### + ##### NSPanel Hotwater ##### - if: - condition: template value_template: '{{ hotwatertemp is match "sensor." and states(hotwatertemp).state != "unavailable" }}' @@ -4495,12 +4293,11 @@ action: component: home.hotwater_temp message: "{{ states(hotwatertemp) |round(1) }}°" - ##### NSPanel Outdoor Temp ##### + ##### NSPanel Outdoor Temp ##### - variables: outdoor_temp: >- {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }} - {%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}} - {%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}} + {%- elif state_attr(weather_entity, "temperature") != None -%} {{state_attr(weather_entity,"temperature") | round(0)}} {%- else -%} 0 {%- endif -%} - delay: @@ -4510,7 +4307,7 @@ action: component: home.outdoor_temp message: "{{ outdoor_temp }}°" - ##### NSPanel boot init - Indoor Temp ##### + ##### NSPanel Indoor Temp ##### - variables: indoor_temp: >- {%- if indoortemp is match "sensor." and states(indoortemp).state != "unavailable" -%} {{ states(indoortemp) |round(1) }} @@ -4552,7 +4349,7 @@ action: data: cmd: home.weather.pic={{ weather_pic }} - ##### NSPanel Left Button Name ##### + ##### NSPanel Left Button Name ##### - if: - condition: template value_template: '{{ left_button_name |length > 0 }}' @@ -4581,7 +4378,7 @@ action: data: cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} - ##### NSPanel Right Button Name ##### + ##### NSPanel Right Button Name ##### - if: - condition: template value_template: '{{ right_button_name |length > 0 }}' @@ -4593,7 +4390,7 @@ action: component: home.right_bt_text message: "{{ right_button_name }}" - ###### SET Right Hardware Button PIC on Home Page ##### + ##### SET Right Hardware Button PIC on Home Page ##### - if: - condition: template @@ -4611,7 +4408,7 @@ action: data: cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} - ###### StatusBar - Climate Symbol ###### + ##### StatusBar - Climate Symbol ###### - if: - condition: template value_template: '{{ climate |length > 0 }}' @@ -4626,7 +4423,7 @@ action: data: cmd: home.icon_top_03.pic={{ top_menu_climate }} - ###### StatusBar - Relay Symbols ###### + ##### StatusBar - Relay Symbols ###### - variables: relay01_pic: >- {%- if states(relay01_entity) == 'on' -%} {{ relay01_pic_on }} @@ -4681,6 +4478,21 @@ action: data: cmd: "homebt04_pic.pic={{ notify_pic }}" + ###### StatusBar - Icon 04 ###### + - if: + - condition: template + value_template: '{{ heatingsystemflame |length > 0 }}' + then: + - variables: + flame_pic: >- + {%- if states(heatingsystemflame) == "on" -%} {{ flame_pic_on }} + {%- else -%} {{ top_menu_blank }} + {%- endif -%} + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.icon_top_04.pic={{ flame_pic }} ## PAGE WEATHE01 ## - conditions: '{{ trigger.event.data.new_state.state == page_weather01 }}' @@ -4691,24 +4503,24 @@ action: - variables: # weather PIC weather_icon: >- - {%- if states(ha_weather) == 'sunny' -%} {{ weather_sunny }} - {%- elif states(ha_weather) == 'cloudy' -%} {{ weather_cloudy }} - {%- elif states(ha_weather) == 'rainy' -%} {{ weather_rainy }} - {%- elif states(ha_weather) == 'pouring' -%} {{ weather_pouring }} - {%- elif states(ha_weather) == 'snowy' -%} {{ weather_snowy }} - {%- elif states(ha_weather) == 'hail' -%} {{ weather_hail }} - {%- elif states(ha_weather) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif states(ha_weather) == 'fog' -%} {{ weather_fog }} - {%- elif states(ha_weather) == 'windy' -%} {{ weather_windy }} - {%- elif states(ha_weather) == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif states(ha_weather) == 'lightning' -%} {{ weather_lightning }} - {%- elif states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} - {%- elif states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} - {%- elif states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} - {%- elif states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} - {%- elif states(ha_weather) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} - {%- elif states(ha_weather) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} - {%- elif states(ha_weather) == 'clear-night' -%} {{ weather_clear_night }} + {%- if states(weather_entity) == 'sunny' -%} {{ weather_sunny }} + {%- elif states(weather_entity) == 'cloudy' -%} {{ weather_cloudy }} + {%- elif states(weather_entity) == 'rainy' -%} {{ weather_rainy }} + {%- elif states(weather_entity) == 'pouring' -%} {{ weather_pouring }} + {%- elif states(weather_entity) == 'snowy' -%} {{ weather_snowy }} + {%- elif states(weather_entity) == 'hail' -%} {{ weather_hail }} + {%- elif states(weather_entity) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif states(weather_entity) == 'fog' -%} {{ weather_fog }} + {%- elif states(weather_entity) == 'windy' -%} {{ weather_windy }} + {%- elif states(weather_entity) == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif states(weather_entity) == 'lightning' -%} {{ weather_lightning }} + {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} + {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} + {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} + {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} + {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} + {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} + {%- elif states(weather_entity) == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -4722,7 +4534,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather01.temp_max ### Temperature MAX ### - message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + message: '{{state_attr(weather_entity,"temperature") | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -4750,7 +4562,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather01.value03 - message: '{{state_attr(ha_weather,"wind_speed") | round(0)}} km/h' + message: '{{state_attr(weather_entity,"wind_speed") | round(0)}} km/h' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -4768,21 +4580,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(accuweather_value,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -4836,7 +4648,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather01.value01 - message: "{{ state_attr(accuweather_value,'forecast')[0].precipitation_probability}} %" + message: "{{ state_attr(weather_entity,'forecast')[0].precipitation_probability}} %" - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -4909,21 +4721,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(ha_weather,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(ha_weather,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -4937,7 +4749,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather02.temp_min ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[0].templow | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[0].templow | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -4953,7 +4765,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather02.temp_max ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[0].temperature | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[0].temperature | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -4979,7 +4791,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather02.value02 - message: '{{state_attr(ha_weather,"forecast")[0].precipitation| round(1)}} mm' + message: '{{state_attr(weather_entity,"forecast")[0].precipitation| round(1)}} mm' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -4992,7 +4804,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather02.value03 - message: '{{state_attr(ha_weather,"forecast")[0].wind_speed | round(1)}} km/h' + message: '{{state_attr(weather_entity,"forecast")[0].wind_speed | round(1)}} km/h' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5010,21 +4822,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(accuweather_value,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -5078,7 +4890,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather02.value01 - message: "{{ state_attr(accuweather_value,'forecast')[1].precipitation_probability}} %" + message: "{{ state_attr(weather_entity,'forecast')[1].precipitation_probability}} %" - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5151,21 +4963,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(ha_weather,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(ha_weather,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -5179,7 +4991,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather03.temp_min ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[1].templow | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[1].templow | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -5195,7 +5007,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather03.temp_max ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[1].temperature | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[1].temperature | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -5221,7 +5033,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather03.value02 - message: '{{state_attr(ha_weather,"forecast")[1].precipitation| round(1)}} mm' + message: '{{state_attr(weather_entity,"forecast")[1].precipitation| round(1)}} mm' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5234,7 +5046,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather03.value03 - message: '{{state_attr(ha_weather,"forecast")[1].wind_speed | round(1)}} km/h' + message: '{{state_attr(weather_entity,"forecast")[1].wind_speed | round(1)}} km/h' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5252,21 +5064,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(accuweather_value,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -5320,7 +5132,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather03.value01 - message: "{{ state_attr(accuweather_value,'forecast')[2].precipitation_probability}} %" + message: "{{ state_attr(weather_entity,'forecast')[2].precipitation_probability}} %" - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5393,21 +5205,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(ha_weather,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(ha_weather,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -5421,7 +5233,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather04.temp_min ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[2].templow | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[2].templow | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -5437,7 +5249,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather04.temp_max ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[2].temperature | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[2].temperature | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -5463,7 +5275,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather04.value02 - message: '{{state_attr(ha_weather,"forecast")[2].precipitation| round(1)}} mm' + message: '{{state_attr(weather_entity,"forecast")[2].precipitation| round(1)}} mm' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5476,7 +5288,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather04.value03 - message: '{{state_attr(ha_weather,"forecast")[2].wind_speed | round(1)}} km/h' + message: '{{state_attr(weather_entity,"forecast")[2].wind_speed | round(1)}} km/h' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5494,21 +5306,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(accuweather_value,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -5562,7 +5374,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather04.value01 - message: "{{ state_attr(accuweather_value,'forecast')[3].precipitation_probability}} %" + message: "{{ state_attr(weather_entity,'forecast')[3].precipitation_probability}} %" - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5635,21 +5447,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(ha_weather,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(ha_weather,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -5663,7 +5475,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather05.temp_min ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[3].templow | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[3].templow | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -5679,7 +5491,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather05.temp_max ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[3].temperature | round(0)}}°' + message: '{{state_attr(weather_entity,"forecast")[3].temperature | round(0)}}°' - delay: milliseconds: "{{ delay_value }}" @@ -5705,7 +5517,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather05.value02 - message: '{{state_attr(ha_weather,"forecast")[3].precipitation| round(1)}} mm' + message: '{{state_attr(weather_entity,"forecast")[3].precipitation| round(1)}} mm' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5718,7 +5530,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather05.value03 - message: '{{state_attr(ha_weather,"forecast")[3].wind_speed | round(1)}} km/h' + message: '{{state_attr(weather_entity,"forecast")[3].wind_speed | round(1)}} km/h' - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5736,21 +5548,21 @@ action: - variables: # weather PIC weather_icon: >- - {%- if state_attr(accuweather_value,"forecast")[4].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- if state_attr(weather_entity,"forecast")[4].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(weather_entity,"forecast")[4].condition == 'clear-night' -%} {{ weather_clear_night }} {%- endif -%} ##### SET weather PIC on Home Page #### @@ -5804,7 +5616,7 @@ action: - service: "{{ command_text_printf }}" data: component: weather05.value01 - message: "{{ state_attr(accuweather_value,'forecast')[4].precipitation_probability}} %" + message: "{{ state_attr(weather_entity,'forecast')[4].precipitation_probability}} %" - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" @@ -5876,8 +5688,7 @@ action: hvac_mode: "{{ states(climate) }}" outdoor_temp: >- {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }} - {%- elif weather == "Default" and state_attr(ha_weather, "temperature") != None -%} {{state_attr(ha_weather,"temperature") | round(0)}} - {%- elif weather == "AccuWeather" and state_attr(accuweather_value, "temperature") != None -%} {{state_attr(accuweather_value,"temperature") | round(0)}} + {%- elif state_attr(weather_entity, "temperature") != None -%} {{state_attr(weather_entity,"temperature") | round(0)}} {%- else -%} 0 {%- endif -%} heating_state: >- @@ -6035,7 +5846,6 @@ action: data: cmd: "page {{ page_climate }}" - ##### Set Flame-Symbol ##### - conditions: - condition: trigger @@ -6050,7 +5860,6 @@ action: data: cmd: home.icon_top_04.pic={{ flame_pic }} - ##### Set Relay01-Symbol ##### - conditions: - condition: trigger @@ -6065,7 +5874,6 @@ action: data: cmd: home.icon_top_01.pic={{ relay01_pic }} - ##### Set Relay02-Symbol ##### - conditions: - condition: trigger @@ -6080,7 +5888,6 @@ action: data: cmd: home.icon_top_02.pic={{ relay02_pic }} - ##### Sync Hotwater Charge button-symbol ##### - conditions: - condition: trigger diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index c360e17..859d68c 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -872,21 +872,10 @@ display: tft_url: ${nextion_update_url} on_setup: then: - - lambda: id(disp1).send_command_printf("page 8"); ##### CHANGE! - Loading page ##### + - lambda: id(disp1).send_command_printf("page 8"); - wait_until: api.connected - delay: 0.5s - - if: - condition: - switch.is_on: notification_sound - then: - - rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6" - - delay: 0.5s - - switch.template.publish: - id: nextion_init - state: on -# - lambda: id(disp1).send_command_printf("page 0"); #### home page ##### - - delay: 2s ##### gives the display time to update other components & set the home page ##### - number.set: id: display_brightness value: !lambda 'return id(display_brightness_global);' @@ -904,3 +893,7 @@ display: { id(disp1).set_component_value("settings.a02",1); } + - delay: 0.5s + - switch.template.publish: + id: nextion_init + state: on