diff --git a/blueprint.yaml b/blueprint.yaml index ac290bb..f0cae2f 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -1,3 +1,7 @@ +############################################################# +##### START - INPUT ##### +############################################################# + blueprint: name: NSPanel Configuration description: v2.0.0 - Configuration and synchronization NSpanele via Blueprint @@ -22,7 +26,7 @@ blueprint: default: /config/www/nspanel/buero/nspanel_buero.tft selector: text: {} - delay_jump_page: + delay: name: Delay to avoid sync problems (coming soon) description: When switching pages, synchronization problems may occur due to the network / WLAN. To avoid this problem enter your value for the delay (milliseconds) default: [] @@ -660,36 +664,27 @@ blueprint: mode: parallel max: 5000 -######################################### -# -# ############################################################# ##### CLOSE - INPUT ##### ############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# + + ############################################################# ##### START - Variables ##### ############################################################# -# -# -######################################### + trigger_variables: nspanel_name_trigger: !input "nspanel_name" last_click: "sensor.{{ nspanel_name_trigger }}_last_click" last_click_lightsettings: "sensor.{{ nspanel_name_trigger }}_last_click_lightsettings" last_click_coversettings: "sensor.{{ nspanel_name_trigger }}_last_click_coversettings" + last_click_weathersettings: "sensor.{{ nspanel_name_trigger }}_last_click_weathersettings" left_button: "binary_sensor.{{ nspanel_name_trigger }}_left_button" right_button: "binary_sensor.{{ nspanel_name_trigger }}_right_button" + weather_forcast_button: "binary_sensor.{{ nspanel_name_trigger }}_weather_forcast" nextion_inited_trigger: "switch.{{ nspanel_name_trigger }}_nextion_inited" entity_long_trigger: "{{ entity_long }}" - variables: nspanel_name: !input "nspanel_name" command_text_printf: "esphome.{{ nspanel_name }}_send_command_text_printf" @@ -709,7 +704,9 @@ variables: right_button_entity: !input "right_button_entity" # Sync Settings - delay_jump_page: !input "delay_jump_page" + delay_boot: !input "delay" + delay_value: !input "delay" + delay_jump_page: !input "delay" sync_slider_ha: !input "sync_slider_ha" sync_value_ha: !input "sync_value_ha" @@ -721,6 +718,31 @@ variables: light_pic_off: "125" light_pic_on: "126" + weather_sunny: "2" + weather_cloudy: "3" + weather_rainy: "4" + weather_pouring: "5" + weather_snowy: "6" + weather_hail: "7" + weather_snowy_rainy: "7" + weather_fog: "8" + weather_windy: "9" + weather_windy_variant: "9" + weather_lightning: "10" + weather_partlycloudy_day: "11" + weather_partlycloudy_night: "12" + weather_lightning_rainy_day: "13" + weather_lightning_rainy_night: "14" + weather_execptional_day: "13" + weather_execptional_night: "14" + weather_clear_night: "15" + + weather_icon_blank: "53" + weather_icon_rain: "59" + weather_icon_sun: "60" + weather_icon_protect: "61" + weather_icon_lightning: "62" + weather_icon_wind: "63" # color for buttons button_light_off: "90" @@ -732,26 +754,41 @@ variables: button_color_1: "65535" button_color_2: "10597" - ##### Weather DE ##### - date0_de: "{{ ((as_timestamp(now())) | 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,') }}" - date1_de: "{{ ((as_timestamp(now()) + 86400) | 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,') }}" - date2_de: "{{ ((as_timestamp(now()) + 172800) | 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,') }}" - date3_de: "{{ ((as_timestamp(now()) + 259200) | 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,') }}" - date4_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,') }}" + ##### Date - DE ##### + date01_de: "{{ ((as_timestamp(now())) | 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,') }}" + date02_de: "{{ ((as_timestamp(now()) + 86400) | 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,') }}" + date03_de: "{{ ((as_timestamp(now()) + 172800) | 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,') }}" + date04_de: "{{ ((as_timestamp(now()) + 259200) | 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,') }}" + date05_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,') }}" - ##### Weather EN ##### - date0_en: "{{ ((as_timestamp(now())) | 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,') }}" - date1_en: "{{ ((as_timestamp(now()) + 86400) | 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,') }}" - date2_en: "{{ ((as_timestamp(now()) + 172800) | 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,') }}" - date3_en: "{{ ((as_timestamp(now()) + 259200) | 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,') }}" - date4_en: "{{ ((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,') }}" + ##### Date - EN ##### + date01_en: "{{ ((as_timestamp(now())) | 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,') }}" + date02_en: "{{ ((as_timestamp(now()) + 86400) | 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,') }}" + date03_en: "{{ ((as_timestamp(now()) + 172800) | 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,') }}" + date04_en: "{{ ((as_timestamp(now()) + 259200) | 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,') }}" + date05_en: "{{ ((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,') }}" + + ##### Day - DE ##### + day01_de: "Heute" + day02_de: "Morgen" + day03_de: "in 2 Tagen" + day04_de: "in 3 Tagen" + day05_de: "in 4 tagen" + + ##### Day - EN ##### + day01_en: "Today" + day02_en: "Tomorrow" + day03_en: "in 2 Days" + day04_en: "in 3 Days" + day05_en: "in 4 Days" ##### Meteorologisk HA Default ##### ha_weather: "weather.home" ##### AccuWeather ##### accuweather: !input "accuweather" - accuweather_home: "weather.{{ accuweather }}" + accuweather_value: "weather.{{ accuweather }}" + ##### Forcast Day 0 Accuweather ##### accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather }}_realfeel_temperature_min_0d" accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather }}_realfeel_temperature_max_0d" @@ -864,311 +901,308 @@ variables: entity32: !input "entity32" entity32_name: !input "entity32_name" -######################################### -# -# ############################################################# ##### CLOSE - Variables ##### ############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# + + ############################################################# ##### START - Trigger ##### ############################################################# -# -# -######################################### trigger: - ###### DELME ###### + + ##### Trigger - General ################################################################################################################# + + ###### DELME - Trigger "nspanel_boot_init" ###### - platform: state entity_id: input_boolean.trigger_nspanel_boot to: "on" id: nspanel_boot_init + + ##### Reboot - Trigger "nspanel_boot_init" ##### + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + id: nspanel_boot_init - ##### TFT Upload ##### + ##### TFT Upload - Trigger "tft_upload" ##### - platform: event event_type: folder_watcher event_data: event_type: modified path: !input "tft_path" id: tft_upload - - #### new nspanel boot init #### - - platform: template - value_template: '{{ states(nextion_inited_trigger) is match "on" }}' - id: nspanel_boot_init - - ######################################################################################################################## - - ##### Page Button - Trigger ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ last_click }}" - id: short_press - - ##### Button LONG Press for jump to Lightsetting or Coversetting Page - Trigger ##### - - platform: template - value_template: '{{ states(last_click) is match "press" }}' - for: - seconds: 1 - id: long_press - - ##### Page Lightsettings - Trigger ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ last_click_lightsettings }}" - id: light_settings - - ##### Page Coversettings - Trigger ##### - - platform: event - event_type: state_changed - event_data: - entity_id: "{{ last_click_coversettings }}" - id: cover_settings - - ##### Page Button Entity sync - Trigger ##### - - platform: template - value_template: '{{ states(last_click) is match "button" }}' - id: button_page - - ######################################################################################################################## - - ##### Time - Trigger ##### + ##### Time - Trigger "time_state" ##### - platform: time_pattern minutes: "/1" id: time_state - #### Weather State - Trigger #### + #### Weather Temp - Trigger "weather_temp_state" #### + - platform: time_pattern + minutes: "10" + id: weather_temp_state + + #### Weather State - Trigger "weather_update_state" #### - platform: template value_template: '{{ states(last_click) is match "weather" }}' id: weather_update_state - #### Weather Time - Trigger #### + #### Weather Time - Trigger "weather_update_time" #### -> kann gelöscht werden nah weather umbau - platform: time_pattern minutes: "10" id: weather_update_time - ##### Humidity - Trigger ##### + ##### Humidity - Trigger "humidity_state" ##### - platform: event event_type: state_changed event_data: entity_id: !input "humidity" id: humidity_state - ##### Hot Water - Trigger ##### + ##### Hot Water - Trigger "hotwatertemp_state" ##### - platform: event event_type: state_changed event_data: entity_id: !input "hotwatertemp" id: hotwatertemp_state - ##### Outdoor Temp - Trigger ##### + ##### Outdoor Temp - Trigger "outdoortemp_state" ##### - platform: event event_type: state_changed event_data: entity_id: !input "outdoortemp" id: outdoortemp_state - ##### Left Button - Trigger ##### + ##### Left Button - Trigger "left_button_press" ##### - platform: template value_template: '{{ states(left_button) is match "on" }}' id: left_button_press - ##### Right Button - Trigger ##### + ##### Right Button - Trigger "right_button_press" ##### - platform: template value_template: '{{ states(right_button) is match "on" }}' id: right_button_press - ##### Button Sync Trigger ################################################################################################################# + + + + ##### Trigger - Button General ################################################################################################################# + + ##### Page Button - Trigger "short_press" - SHORT Press via "last_click" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click }}" + id: short_press + + ##### Page Button - Trigger "long_press" - LONG Press via "last_click" - Button LONG Press for jump to Lightsetting or Coversetting Page ##### + - platform: template + value_template: '{{ states(last_click) is match "press" }}' + for: + seconds: 1 + id: long_press + + ##### Page Lightsettings - Trigger "light_settings" - Changes Lightsettings Page via "last_click_lightsettings" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_lightsettings }}" + id: light_settings + + ##### Page Coversettings - Trigger "cover_settings" - Changes Coversettings Page via "last_click_coversettings" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_coversettings }}" + id: cover_settings + + ##### Page Weather Forcast - Trigger "weather_settings" - Changes Weather Page via "last_click_weathersettings" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_weathersettings }}" + id: weather_settings + + ##### Page Button - Trigger "button_page" Entity sync ##### + - platform: template + value_template: '{{ states(last_click) is match "button" }}' + id: button_page + + + + ##### Trigger - Button State change ################################################################################################################# - ##### Button01 Sync - Trigger ##### + ##### Button01 Sync - Trigger "current_state_entity01" ##### - platform: state entity_id: !input "entity01" id: current_state_entity01 - ##### Button02 Sync - Trigger ##### + ##### Button02 Sync - Trigger "current_state_entity02" ##### - platform: state entity_id: !input "entity02" id: current_state_entity02 - ##### Button03 Sync - Trigger ##### + ##### Button03 Sync - Trigger "current_state_entity03" ##### - platform: state entity_id: !input "entity03" id: current_state_entity03 - ##### Button04 Sync - Trigger ##### + ##### Button04 Sync - Trigger "current_state_entity04" ##### - platform: state entity_id: !input "entity04" id: current_state_entity04 - ##### Button05 Sync - Trigger ##### + ##### Button05 Sync - Trigger "current_state_entity05" ##### - platform: state entity_id: !input "entity05" id: current_state_entity05 - ##### Button06 Sync - Trigger ##### + ##### Button06 Sync - Trigger "current_state_entity06" ##### - platform: state entity_id: !input "entity06" id: current_state_entity06 - ##### Button07 Sync - Trigger ##### + ##### Button07 Sync - Trigger "current_state_entity07" ##### - platform: state entity_id: !input "entity07" id: current_state_entity07 - ##### Button08 Sync - Trigger ##### + ##### Button08 Sync - Trigger "current_state_entity08" ##### - platform: state entity_id: !input "entity08" id: current_state_entity08 - ##### Button09 Sync - Trigger ##### + ##### Button09 Sync - Trigger "current_state_entity09" ##### - platform: state entity_id: !input "entity09" id: current_state_entity09 - ##### Button10 Sync - Trigger ##### + ##### Button10 Sync - Trigger "current_state_entity10" ##### - platform: state entity_id: !input "entity10" id: current_state_entity10 - ##### Button11 Sync - Trigger ##### + ##### Button11 Sync - Trigger "current_state_entity11" ##### - platform: state entity_id: !input "entity11" id: current_state_entity11 - ##### Button12 Sync - Trigger ##### + ##### Button12 Sync - Trigger "current_state_entity12" ##### - platform: state entity_id: !input "entity12" id: current_state_entity12 - ##### Button13 Sync - Trigger ##### + ##### Button13 Sync - Trigger "current_state_entity13" ##### - platform: state entity_id: !input "entity13" id: current_state_entity13 - ##### Button14 Sync - Trigger ##### + ##### Button14 Sync - Trigger "current_state_entity14" ##### - platform: state entity_id: !input "entity14" id: current_state_entity14 - ##### Button15 Sync - Trigger ##### + ##### Button15 Sync - Trigger "current_state_entity15" ##### - platform: state entity_id: !input "entity15" id: current_state_entity15 - ##### Button16 Sync - Trigger ##### + ##### Button16 Sync - Trigger "current_state_entity16" ##### - platform: state entity_id: !input "entity16" id: current_state_entity16 - ##### Button17 Sync - Trigger ##### + ##### Button17 Sync - Trigger "current_state_entity17" ##### - platform: state entity_id: !input "entity17" id: current_state_entity17 - ##### Button18 Sync - Trigger ##### + ##### Button18 Sync - Trigger "current_state_entity18" ##### - platform: state entity_id: !input "entity18" id: current_state_entity18 - ##### Button19 Sync - Trigger ##### + ##### Button19 Sync - Trigger "current_state_entity19" ##### - platform: state entity_id: !input "entity19" id: current_state_entity19 - ##### Button20 Sync - Trigger ##### + ##### Button20 Sync - Trigger "current_state_entity20" ##### - platform: state entity_id: !input "entity20" id: current_state_entity20 - ##### Button21 Sync - Trigger ##### + ##### Button21 Sync - Trigger "current_state_entity21" ##### - platform: state entity_id: !input "entity21" id: current_state_entity21 - ##### Button22 Sync - Trigger ##### + ##### Button22 Sync - Trigger "current_state_entity22" ##### - platform: state entity_id: !input "entity22" id: current_state_entity22 - ##### Button23 Sync - Trigger ##### + ##### Button23 Sync - Trigger "current_state_entity23" ##### - platform: state entity_id: !input "entity23" id: current_state_entity23 - ##### Button24 Sync - Trigger ##### + ##### Button24 Sync - Trigger "current_state_entity24" ##### - platform: state entity_id: !input "entity24" id: current_state_entity24 - ##### Button25 Sync - Trigger ##### + ##### Button25 Sync - Trigger "current_state_entity25" ##### - platform: state entity_id: !input "entity25" id: current_state_entity25 - ##### Button26 Sync - Trigger ##### + ##### Button26 Sync - Trigger "current_state_entity26" ##### - platform: state entity_id: !input "entity26" id: current_state_entity26 - ##### Button27 Sync - Trigger ##### + ##### Button27 Sync - Trigger "current_state_entity27" ##### - platform: state entity_id: !input "entity27" id: current_state_entity27 - ##### Button28 Sync - Trigger ##### + ##### Button28 Sync - Trigger "current_state_entity28" ##### - platform: state entity_id: !input "entity28" id: current_state_entity28 - ##### Button29 Sync - Trigger ##### + ##### Button29 Sync - Trigger "current_state_entity29" ##### - platform: state entity_id: !input "entity29" id: current_state_entity29 - ##### Button30 Sync - Trigger ##### + ##### Button30 Sync - Trigger "current_state_entity30" ##### - platform: state entity_id: !input "entity30" id: current_state_entity30 - ##### Button31 Sync - Trigger ##### + ##### Button31 Sync - Trigger "current_state_entity31" ##### - platform: state entity_id: !input "entity31" id: current_state_entity31 - ##### Button32 Sync - Trigger ##### + ##### Button32 Sync - Trigger "current_state_entity32" ##### - platform: state entity_id: !input "entity32" id: current_state_entity32 -######################################### -# -# + ############################################################# ##### CLOSE - Trigger ##### ############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# + + ############################################################# ##### START - Action ##### ############################################################# -# -# -######################################### + action: - variables: ##### Entity - Page Button - Toggle Entity ##### @@ -1243,7 +1277,7 @@ action: {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32 }} {%- endif -%} - ##### Entity Name - Page Lightsettings ##### + ##### Entity Name - Page Lightsettings ##### entity_long_name: >- {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01_name }} {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02_name }} @@ -1317,229 +1351,16 @@ action: ######################################################################################################################## - # main - alias: "choose alias (name)" + # main - alias: "choose alias (name) - NEW VERSION" - choose: - #### Update button on entity state_change #### - - conditions: - - condition: trigger - id: - - current_state_entity01 - - current_state_entity02 - - current_state_entity03 - - current_state_entity04 - - current_state_entity05 - - current_state_entity06 - - current_state_entity07 - - current_state_entity08 - - current_state_entity09 - - current_state_entity10 - - current_state_entity11 - - current_state_entity12 - - current_state_entity13 - - current_state_entity14 - - current_state_entity15 - - current_state_entity16 - - current_state_entity17 - - current_state_entity18 - - current_state_entity19 - - current_state_entity20 - - current_state_entity21 - - current_state_entity22 - - current_state_entity23 - - current_state_entity24 - - current_state_entity25 - - current_state_entity26 - - current_state_entity27 - - current_state_entity28 - - current_state_entity29 - - current_state_entity30 - - current_state_entity31 - - current_state_entity32 - sequence: - - alias: "Set variable(s) for entity change" - variables: - component_to_update: >- - {%- if 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 - {%- elif trigger.entity_id == entity05 -%} buttonpage01.button05 - {%- elif trigger.entity_id == entity06 -%} buttonpage01.button06 - {%- elif trigger.entity_id == entity07 -%} buttonpage01.button07 - {%- elif trigger.entity_id == entity08 -%} buttonpage01.button08 - {%- elif trigger.entity_id == entity09 -%} buttonpage02.button01 - {%- elif trigger.entity_id == entity10 -%} buttonpage02.button02 - {%- elif trigger.entity_id == entity11 -%} buttonpage02.button03 - {%- elif trigger.entity_id == entity12 -%} buttonpage02.button04 - {%- elif trigger.entity_id == entity13 -%} buttonpage02.button05 - {%- elif trigger.entity_id == entity14 -%} buttonpage02.button06 - {%- elif trigger.entity_id == entity15 -%} buttonpage02.button07 - {%- elif trigger.entity_id == entity16 -%} buttonpage02.button08 - {%- elif trigger.entity_id == entity17 -%} buttonpage03.button01 - {%- elif trigger.entity_id == entity18 -%} buttonpage03.button02 - {%- elif trigger.entity_id == entity19 -%} buttonpage03.button03 - {%- elif trigger.entity_id == entity20 -%} buttonpage03.button04 - {%- elif trigger.entity_id == entity21 -%} buttonpage03.button05 - {%- elif trigger.entity_id == entity22 -%} buttonpage03.button06 - {%- elif trigger.entity_id == entity23 -%} buttonpage03.button07 - {%- elif trigger.entity_id == entity24 -%} buttonpage03.button08 - {%- elif trigger.entity_id == entity25 -%} buttonpage04.button01 - {%- elif trigger.entity_id == entity26 -%} buttonpage04.button02 - {%- elif trigger.entity_id == entity27 -%} buttonpage04.button03 - {%- elif trigger.entity_id == entity28 -%} buttonpage04.button04 - {%- elif trigger.entity_id == entity29 -%} buttonpage04.button05 - {%- elif trigger.entity_id == entity30 -%} buttonpage04.button06 - {%- elif trigger.entity_id == entity31 -%} buttonpage04.button07 - {%- elif trigger.entity_id == entity32 -%} buttonpage04.button08 - {%- endif -%} - # Button PIC - btn_pic: >- - {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' -%} {{ button_light_on }} - {%- elif trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'off' -%} {{ button_light_off }} - {%- elif trigger.to_state.entity_id is match "switch." and trigger.to_state.state == 'on' -%} {{ button_switch_on }} - {%- elif trigger.to_state.entity_id is match "switch." and trigger.to_state.state == 'off' -%} {{ button_switch_off }} - {%- elif trigger.to_state.entity_id is match "input_boolean." and trigger.to_state.state == 'on' -%} {{ button_switch_on }} - {%- elif trigger.to_state.entity_id is match "input_boolean." and trigger.to_state.state == 'off' -%} {{ button_switch_off }} - {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'on' -%} {{ button_cover_on }} - {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'off' -%} {{ button_cover_off }} - {%- endif -%} - # TEXT and BRIGHTNESS Background - btn_bg: >- - {%- if trigger.to_state.state == 'on' or trigger.to_state.state == 'open' -%} {{ button_color_1 }} - {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_2 }} - {%- endif -%} - # TEXT Font - btn_txt_font: >- - {%- if trigger.to_state.state == 'on' or trigger.to_state.state == 'open' -%} {{ button_color_2 }} - {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_1 }} - {%- endif -%} - # BRIGHTNESS Font - btn_bri_font: "{{ button_color_2 }}" - # BTN Label - btn_label: >- - {%- if trigger.entity_id == entity01 -%} {{ entity01_name }} - {%- elif trigger.entity_id == entity02 -%} {{ entity02_name }} - {%- elif trigger.entity_id == entity03 -%} {{ entity03_name }} - {%- elif trigger.entity_id == entity04 -%} {{ entity04_name }} - {%- elif trigger.entity_id == entity05 -%} {{ entity05_name }} - {%- elif trigger.entity_id == entity06 -%} {{ entity06_name }} - {%- elif trigger.entity_id == entity07 -%} {{ entity07_name }} - {%- elif trigger.entity_id == entity08 -%} {{ entity08_name }} - {%- elif trigger.entity_id == entity09 -%} {{ entity09_name }} - {%- elif trigger.entity_id == entity10 -%} {{ entity10_name }} - {%- elif trigger.entity_id == entity11 -%} {{ entity11_name }} - {%- elif trigger.entity_id == entity12 -%} {{ entity12_name }} - {%- elif trigger.entity_id == entity13 -%} {{ entity13_name }} - {%- elif trigger.entity_id == entity14 -%} {{ entity14_name }} - {%- elif trigger.entity_id == entity15 -%} {{ entity15_name }} - {%- elif trigger.entity_id == entity16 -%} {{ entity16_name }} - {%- elif trigger.entity_id == entity17 -%} {{ entity17_name }} - {%- elif trigger.entity_id == entity18 -%} {{ entity18_name }} - {%- elif trigger.entity_id == entity19 -%} {{ entity19_name }} - {%- elif trigger.entity_id == entity20 -%} {{ entity20_name }} - {%- elif trigger.entity_id == entity21 -%} {{ entity21_name }} - {%- elif trigger.entity_id == entity22 -%} {{ entity22_name }} - {%- elif trigger.entity_id == entity23 -%} {{ entity23_name }} - {%- elif trigger.entity_id == entity24 -%} {{ entity24_name }} - {%- elif trigger.entity_id == entity25 -%} {{ entity25_name }} - {%- elif trigger.entity_id == entity26 -%} {{ entity26_name }} - {%- elif trigger.entity_id == entity27 -%} {{ entity27_name }} - {%- elif trigger.entity_id == entity28 -%} {{ entity28_name }} - {%- elif trigger.entity_id == entity29 -%} {{ entity29_name }} - {%- elif trigger.entity_id == entity30 -%} {{ entity30_name }} - {%- elif trigger.entity_id == entity31 -%} {{ entity31_name }} - {%- elif trigger.entity_id == entity32 -%} {{ entity32_name }} - {%- endif -%} - btn_bri_txt: >- - {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' and trigger.to_state.attributes.brightness is defined -%} {{ (trigger.to_state.attributes.brightness | int * 100 /254) | round(0) }}% - {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' and trigger.to_state.attributes.current_position is defined -%} {{ (trigger.to_state.attributes.current_position | int) | round(0) }}% - {%- else -%} 0 - {%- endif -%} - - ##### Button PIC ##### - - service: "{{ command_printf }}" - data: - cmd: "{{ component_to_update }}pic.pic={{ btn_pic }}" - ##### TEXT Background ##### - - service: "{{ command_background_color }}" - data: - component: "{{ component_to_update }}text" - message: "{{ btn_bg }}" - ##### TEXT Font Color ##### - - service: "{{ command_font_color }}" - data: - component: "{{ component_to_update }}text" - message: "{{ btn_txt_font }}" - ##### BRIGHTNESS Background Color ##### - - service: "{{ command_background_color }}" - data: - component: "{{ component_to_update }}bri" - message: "{{ btn_bg }}" - ##### BRIGHTNESS Font Color ##### - - service: "{{ command_font_color }}" - data: - component: "{{ component_to_update }}bri" - message: "{{ btn_bri_font }}" - ##### "TEXT" Label ##### - - service: "{{ command_text_printf }}" - data: - component: "{{ component_to_update }}text" - message: "{{ btn_label }}" - ##### "BRIGHTNESS" Text ##### - - if: - - condition: template - value_template: "{{ btn_bri_txt == 0 }}" - then: - - service: "{{ command_text_printf }}" - data: - component: "{{ component_to_update }}bri" - message: " " - else: - - service: "{{ command_text_printf }}" - data: - component: "{{ component_to_update }}bri" - message: "{{ btn_bri_txt }}" - #### Left button press - - conditions: - - condition: trigger - id: left_button_press - sequence: - - service: >- - {% if left_button_entity is match 'light.' %} - light.toggle - {% elif left_button_entity is match 'switch.' %} - switch.toggle - {% elif left_button_entity is match 'cover.' %} - cover.toggle - {% elif left_button_entity is match 'input_boolean.' %} - input_boolean.toggle - {% endif %} - data: - entity_id: "{{ left_button_entity }}" - #### Right button press - - conditions: - - condition: trigger - id: right_button_press - sequence: - - service: >- - {% if right_button_entity is match 'light.' %} - light.toggle - {% elif right_button_entity is match 'switch.' %} - switch.toggle - {% elif right_button_entity is match 'cover.' %} - cover.toggle - {% elif right_button_entity is match 'input_boolean.' %} - input_boolean.toggle - {% endif %} - data: - entity_id: "{{ right_button_entity }}" - ### NSPanel boot init + ##### NSPanel boot init ##### DONE - conditions: - condition: trigger id: nspanel_boot_init sequence: - #### NSPanel boot init start + + ##### NSPanel boot init start ##### - delay: milliseconds: 100 - service: "{{ command_text_printf }}" @@ -1547,251 +1368,95 @@ action: component: home.loading message: "Loading - PLS WAIT!" - #### NSPanel boot init language + ##### NSPanel boot init language ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - choose: - #### NSPanel boot init language DE + ##### NSPanel boot init language DE ##### DONE - conditions: - condition: template value_template: '{{ language == "DE" }}' sequence: - - service: "{{ command_text_printf }}" - data: - component: weather01.a01 - message: Heute - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather02.a01 - message: Morgen - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather03.a01 - message: in 2 Tagen - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather04.a01 - message: in 3 Tagen - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather05.a01 - message: in 4 Tagen - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a06 - message: Neustart - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a07 - message: Sleep - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a08 - message: Helligkeit - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a09 - message: Dimmen - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: coversettings.a07 - message: Rollo - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: coversettings.a08 - message: Position - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.a07 - message: Licht - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.a08 - message: Helligkeit - ####### Date and Forecast - - delay: - milliseconds: 11 + ####### Date ##### - service: "{{ command_text_printf }}" data: component: home.a02 - message: "{{ date0_de }}" + message: "{{ date01_de }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather01.a02 - message: "{{ date0_de }}" + message: "{{ date01_de }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather02.a02 - message: "{{ date1_de }}" + message: "{{ date02_de }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather03.a02 - message: "{{ date2_de }}" + message: "{{ date03_de }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather04.a02 - message: "{{ date3_de }}" + message: "{{ date04_de }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather05.a02 - message: "{{ date4_de }}" + message: "{{ date05_de }}" - #### NSPanel boot init language EN + ##### NSPanel boot init language EN ##### DONE - conditions: - condition: template value_template: '{{ language == "EN" }}' sequence: - - service: "{{ command_text_printf }}" - data: - component: weather01.a01 - message: Today - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather02.a01 - message: Tomorrow - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather03.a01 - message: in 2 Days - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather04.a01 - message: in 3 Days - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: weather05.a01 - message: in 4 Days - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a06 - message: Reboot - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a07 - message: Sleep - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a08 - message: Brightness - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: settings.a09 - message: Dimming - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: coversettings.a07 - message: Cover - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: coversettings.a08 - message: Position - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.a07 - message: Light - - delay: - milliseconds: 11 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.a08 - message: Brightness - ####### Date and Forecast - - delay: - milliseconds: 11 + ##### Date ##### - service: "{{ command_text_printf }}" data: component: home.a02 - message: "{{ date0_en }}" + message: "{{ date01_en }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather01.a02 - message: "{{ date0_en }}" + message: "{{ date01_en }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather02.a02 - message: "{{ date1_en }}" + message: "{{ date02_en }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather03.a02 - message: "{{ date2_en }}" + message: "{{ date03_en }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather04.a02 - message: "{{ date3_en }}" + message: "{{ date04_en }}" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: weather05.a02 - message: "{{ date4_de }}" + message: "{{ date05_de }}" - #### NSPanel boot init buttons + ##### NSPanel boot init buttons ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - repeat: for_each: - entity: "{{ entity01 }}" @@ -1905,8 +1570,8 @@ action: {%- elif repeat.item.entity is match "switch." and states[repeat.item.entity].state == 'off' -%} {{ button_switch_off }} {%- elif repeat.item.entity is match "input_boolean." and states[repeat.item.entity].state == 'on' -%} {{ button_switch_on }} {%- elif repeat.item.entity is match "input_boolean." and states[repeat.item.entity].state == 'off' -%} {{ button_switch_off }} - {%- elif repeat.item.entity is match "cover." and states[repeat.item.entity].state == 'on' -%} {{ button_cover_on }} - {%- elif repeat.item.entity is match "cover." and states[repeat.item.entity].state == 'off' -%} {{ button_cover_off }} + {%- elif repeat.item.entity is match "cover." and states[repeat.item.entity].state == 'open' -%} {{ button_cover_on }} + {%- elif repeat.item.entity is match "cover." and states[repeat.item.entity].state == 'closed' -%} {{ button_cover_off }} {%- endif -%} # TEXT and BRIGHTNESS Background btn_bg: >- @@ -1923,7 +1588,7 @@ action: # BTN Label btn_label: "{{ repeat.item.button_label }}" btn_bri_txt: >- - {%- if repeat.item.entity is match "light." and states(repeat.item.entity) == 'on' and state_attr(repeat.item.entity, "brightness") != None -%} {{ (state_attr(repeat.item.entity, "brightness") | int(255) * 100 /254) | round(0) }}% + {%- if repeat.item.entity is match "light." and states(repeat.item.entity) == 'on' and state_attr(repeat.item.entity, "brightness") != None -%} {{ (state_attr(repeat.item.entity, "brightness") | int * 100 /255) | round(0) }}% {%- elif repeat.item.entity is match "cover." and states(repeat.item.entity) == 'open' and state_attr(repeat.item.entity, "current_position") != None -%} {{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}% {%- else -%} 0 {%- endif -%} @@ -1936,42 +1601,42 @@ action: cmd: "{{ component_to_update }}pic.pic={{ btn_pic }}" ##### TEXT Background ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_background_color }}" data: component: "{{ component_to_update }}text" message: "{{ btn_bg }}" ##### TEXT Font Color ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_font_color }}" data: component: "{{ component_to_update }}text" message: "{{ btn_txt_font }}" ##### BRIGHTNESS Background Color ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_background_color }}" data: component: "{{ component_to_update }}bri" message: "{{ btn_bg }}" ##### BRIGHTNESS Font Color ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_font_color }}" data: component: "{{ component_to_update }}bri" message: "{{ btn_bri_font }}" ##### "TEXT" Label ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: "{{ component_to_update }}text" message: "{{ btn_label }}" ##### "BRIGHTNESS" Text ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - if: - condition: template value_template: "{{ btn_bri_txt == 0 }}" @@ -1986,1937 +1651,601 @@ action: component: "{{ component_to_update }}bri" message: "{{ btn_bri_txt }}" - #### NSPanel boot init weather - - choose: - #### Default weather - - conditions: - - condition: template - value_template: '{{ weather == "Default" }}' - sequence: - - if: - - condition: template - value_template: "{{states(ha_weather) == 'sunny'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=2 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'cloudy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=3 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=4 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'pouring'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=5 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'snowy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=6 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'hail'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'snowy-rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'fog'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=8 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'windy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'windy-variant'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'lightning'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=10 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'above_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=11 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'below_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=12 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'execptional' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'execptional' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'clear-night'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=15 - - ##### Weather Forcast Today Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=15 - - ##### Weather Forcast Day 1 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=15 - - ##### Weather Forcast Day 2 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=15 - - ##### Weather Forcast Day 3 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=15 - - ##### Weather Forcast Day 4 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=15 - - ##### Weather Forcast Today "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a04 ### Temperature MIN ### - message: " " - - service: "{{ command_text_printf }}" - data: - component: weather01.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' - - ##### Weather Forcast Day 1 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[1].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather02.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[1].temperature | round(0)}}°' - - ##### Weather Forcast Day 2 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[2].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather03.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[2].temperature | round(0)}}°' - - ##### Weather Forcast Day 3 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[3].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather04.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[3].temperature | round(0)}}°' - - ##### Weather Forcast Day 4 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[4].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather05.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[4].temperature | round(0)}}°' - - #### Accuweather - - conditions: - - condition: template - value_template: '{{ weather == "AccuWeather" }}' - sequence: - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'sunny'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=2 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'cloudy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=3 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=4 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'pouring'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=5 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'snowy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=6 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'hail'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'snowy-rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'fog'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=8 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'windy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'windy-variant'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'lightning'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=10 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'partlycloudy' and states('sun.sun') == 'above_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=11 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'partlycloudy' and states('sun.sun') == 'below_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=12 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'lightning-rainy' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'lightning-rainy' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'execptional' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'execptional' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'clear-night'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=15 - - ##### Weather Forcast Today Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=15 - - ##### Weather Forcast Day 1 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=15 - - ##### Weather Forcast Day 2 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=15 - - ##### Weather Forcast Day 3 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=15 - - ##### Weather Forcast Day 4 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=15 - - ##### Weather Forcast Today "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_0d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather01.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" - - ##### Weather Forcast Day 1 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_1d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather02.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_1d) | round(0)}}°" - - ##### Weather Forcast Day 2 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_2d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather03.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_2d) | round(0)}}°" - - ##### Weather Forcast Day 3 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_3d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather04.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_3d) | round(0)}}°" - - ##### Weather Forcast Day 4 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_4d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather05.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_4d) | round(0)}}°" - - - #### NSPanel boot init entities - ### Time + ##### NSPanel boot init - Time ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.a01 message: "{{ time }}" - ### Humidity + + ##### NSPanel boot init - Humidity ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.a04 message: "{{ states(humidity) |round(0) }}%" - ### Hotwater + + ##### NSPanel boot init - Hotwater ##### - if: - condition: template value_template: '{{ hotwatertemp is match "sensor." }}' then: - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.p01.pic=68 + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.a07 message: "{{ states(hotwatertemp) |round(1) }}°" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: thermostat.a08 message: "{{ states(hotwatertemp) |round(1) }}°" - - delay: - milliseconds: 11 - - service: "{{ command_printf }}" - data: - cmd: home.p01.pic=68 - ### Outdoor Temp + + ##### NSPanel boot init - Outdoor Temp ##### - choose: - ### Outdoor Temp Entity + ##### Outdoor Temp Entity ##### - conditions: - condition: template value_template: '{{ outdoortemp is match "sensor." }}' sequence: - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.a06 message: "{{ states(outdoortemp) |round(0) }}°" - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: thermostat.a07 message: "{{ states(outdoortemp) |round(0) }}°" - ### Outdoor Temp Default + + ##### Outdoor Temp Default ##### - conditions: - condition: template - value_template: '{{ outdoortemp == "default" }}' + value_template: '{{ outdoortemp != "sensor." and weather == "Default" }}' sequence: - ### Outdoor Temp Default + ##### Outdoor Temp Default ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.a06 message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: thermostat.a07 message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' - ### Outdoor TempAccuweather + + ##### Outdoor TempAccuweather ##### - conditions: - condition: template - value_template: '{{ outdoortemp == "accuweather" }}' + value_template: '{{ outdoortemp != "sensor." and weather == "AccuWeather" }}' sequence: ### Outdoor TempAccuweather + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.a06 message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: thermostat.a07 message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" - #### NSPanel boot init finished + ##### Weather Icon Home Page + - choose: + ##### Weather PIC - DEFAULT HA ##### + - conditions: + - condition: template + value_template: '{{ weather == "Default" }}' + sequence: + - variables: + # weather PIC + weather_pic: >- + {%- 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic={{ weather_pic }} + + ##### Weather PIC - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ weather == "AccuWeather" }}' + sequence: + - variables: + # weather PIC + weather_pic: >- + {%- if states(accuweather_value) == 'sunny' -%} {{ weather_sunny }} + {%- elif states(accuweather_value) == 'cloudy' -%} {{ weather_cloudy }} + {%- elif states(accuweather_value) == 'rainy' -%} {{ weather_rainy }} + {%- elif states(accuweather_value) == 'pouring' -%} {{ weather_pouring }} + {%- elif states(accuweather_value) == 'snowy' -%} {{ weather_snowy }} + {%- elif states(accuweather_value) == 'hail' -%} {{ weather_hail }} + {%- elif states(accuweather_value) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif states(accuweather_value) == 'fog' -%} {{ weather_fog }} + {%- elif states(accuweather_value) == 'windy' -%} {{ weather_windy }} + {%- elif states(accuweather_value) == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif states(accuweather_value) == 'lightning' -%} {{ weather_lightning }} + {%- elif states(accuweather_value) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} + {%- elif states(accuweather_value) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} + {%- elif states(accuweather_value) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} + {%- elif states(accuweather_value) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} + {%- elif states(accuweather_value) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} + {%- elif states(accuweather_value) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} + {%- elif states(accuweather_value) == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic={{ weather_pic }} + + ##### NSPanel boot init finished ##### - delay: - milliseconds: 11 + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: home.loading message: " " - ##### Date Home Page + Forcast DE ##### - - choose: + + #### TFT Upload Automation ##### DONE + - conditions: + - condition: trigger + id: tft_upload + sequence: + - delay: + seconds: 2 + - service: "{{ tft_upload }}" + data: {} + + + + ##### Update Button Page and Lightsettings / Coversettings Page ##### DONE - conditions: - condition: trigger id: - # - nspanel_boot_language - - time_state - - condition: template - value_template: '{{ language == "DE" }}' + - current_state_entity01 + - current_state_entity02 + - current_state_entity03 + - current_state_entity04 + - current_state_entity05 + - current_state_entity06 + - current_state_entity07 + - current_state_entity08 + - current_state_entity09 + - current_state_entity10 + - current_state_entity11 + - current_state_entity12 + - current_state_entity13 + - current_state_entity14 + - current_state_entity15 + - current_state_entity16 + - current_state_entity17 + - current_state_entity18 + - current_state_entity19 + - current_state_entity20 + - current_state_entity21 + - current_state_entity22 + - current_state_entity23 + - current_state_entity24 + - current_state_entity25 + - current_state_entity26 + - current_state_entity27 + - current_state_entity28 + - current_state_entity29 + - current_state_entity30 + - current_state_entity31 + - current_state_entity32 sequence: - - service: "{{ command_text_printf }}" + - alias: "Set variable(s) for entity change" + variables: + component_to_update: >- + {%- if 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 + {%- elif trigger.entity_id == entity05 -%} buttonpage01.button05 + {%- elif trigger.entity_id == entity06 -%} buttonpage01.button06 + {%- elif trigger.entity_id == entity07 -%} buttonpage01.button07 + {%- elif trigger.entity_id == entity08 -%} buttonpage01.button08 + {%- elif trigger.entity_id == entity09 -%} buttonpage02.button01 + {%- elif trigger.entity_id == entity10 -%} buttonpage02.button02 + {%- elif trigger.entity_id == entity11 -%} buttonpage02.button03 + {%- elif trigger.entity_id == entity12 -%} buttonpage02.button04 + {%- elif trigger.entity_id == entity13 -%} buttonpage02.button05 + {%- elif trigger.entity_id == entity14 -%} buttonpage02.button06 + {%- elif trigger.entity_id == entity15 -%} buttonpage02.button07 + {%- elif trigger.entity_id == entity16 -%} buttonpage02.button08 + {%- elif trigger.entity_id == entity17 -%} buttonpage03.button01 + {%- elif trigger.entity_id == entity18 -%} buttonpage03.button02 + {%- elif trigger.entity_id == entity19 -%} buttonpage03.button03 + {%- elif trigger.entity_id == entity20 -%} buttonpage03.button04 + {%- elif trigger.entity_id == entity21 -%} buttonpage03.button05 + {%- elif trigger.entity_id == entity22 -%} buttonpage03.button06 + {%- elif trigger.entity_id == entity23 -%} buttonpage03.button07 + {%- elif trigger.entity_id == entity24 -%} buttonpage03.button08 + {%- elif trigger.entity_id == entity25 -%} buttonpage04.button01 + {%- elif trigger.entity_id == entity26 -%} buttonpage04.button02 + {%- elif trigger.entity_id == entity27 -%} buttonpage04.button03 + {%- elif trigger.entity_id == entity28 -%} buttonpage04.button04 + {%- elif trigger.entity_id == entity29 -%} buttonpage04.button05 + {%- elif trigger.entity_id == entity30 -%} buttonpage04.button06 + {%- elif trigger.entity_id == entity31 -%} buttonpage04.button07 + {%- elif trigger.entity_id == entity32 -%} buttonpage04.button08 + {%- endif -%} + # Button PIC + btn_pic: >- + {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' -%} {{ button_light_on }} + {%- elif trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'off' -%} {{ button_light_off }} + {%- elif trigger.to_state.entity_id is match "switch." and trigger.to_state.state == 'on' -%} {{ button_switch_on }} + {%- elif trigger.to_state.entity_id is match "switch." and trigger.to_state.state == 'off' -%} {{ button_switch_off }} + {%- elif trigger.to_state.entity_id is match "input_boolean." and trigger.to_state.state == 'on' -%} {{ button_switch_on }} + {%- elif trigger.to_state.entity_id is match "input_boolean." and trigger.to_state.state == 'off' -%} {{ button_switch_off }} + {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' -%} {{ button_cover_on }} + {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'closed' -%} {{ button_cover_off }} + {%- endif -%} + # TEXT and BRIGHTNESS Background + btn_bg: >- + {%- if trigger.to_state.state == 'on' or trigger.to_state.state == 'open' -%} {{ button_color_1 }} + {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_2 }} + {%- endif -%} + # TEXT Font + btn_txt_font: >- + {%- if trigger.to_state.state == 'on' or trigger.to_state.state == 'open' -%} {{ button_color_2 }} + {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_1 }} + {%- endif -%} + # BRIGHTNESS Font + btn_bri_font: "{{ button_color_2 }}" + # BTN Label + btn_label: >- + {%- if trigger.entity_id == entity01 -%} {{ entity01_name }} + {%- elif trigger.entity_id == entity02 -%} {{ entity02_name }} + {%- elif trigger.entity_id == entity03 -%} {{ entity03_name }} + {%- elif trigger.entity_id == entity04 -%} {{ entity04_name }} + {%- elif trigger.entity_id == entity05 -%} {{ entity05_name }} + {%- elif trigger.entity_id == entity06 -%} {{ entity06_name }} + {%- elif trigger.entity_id == entity07 -%} {{ entity07_name }} + {%- elif trigger.entity_id == entity08 -%} {{ entity08_name }} + {%- elif trigger.entity_id == entity09 -%} {{ entity09_name }} + {%- elif trigger.entity_id == entity10 -%} {{ entity10_name }} + {%- elif trigger.entity_id == entity11 -%} {{ entity11_name }} + {%- elif trigger.entity_id == entity12 -%} {{ entity12_name }} + {%- elif trigger.entity_id == entity13 -%} {{ entity13_name }} + {%- elif trigger.entity_id == entity14 -%} {{ entity14_name }} + {%- elif trigger.entity_id == entity15 -%} {{ entity15_name }} + {%- elif trigger.entity_id == entity16 -%} {{ entity16_name }} + {%- elif trigger.entity_id == entity17 -%} {{ entity17_name }} + {%- elif trigger.entity_id == entity18 -%} {{ entity18_name }} + {%- elif trigger.entity_id == entity19 -%} {{ entity19_name }} + {%- elif trigger.entity_id == entity20 -%} {{ entity20_name }} + {%- elif trigger.entity_id == entity21 -%} {{ entity21_name }} + {%- elif trigger.entity_id == entity22 -%} {{ entity22_name }} + {%- elif trigger.entity_id == entity23 -%} {{ entity23_name }} + {%- elif trigger.entity_id == entity24 -%} {{ entity24_name }} + {%- elif trigger.entity_id == entity25 -%} {{ entity25_name }} + {%- elif trigger.entity_id == entity26 -%} {{ entity26_name }} + {%- elif trigger.entity_id == entity27 -%} {{ entity27_name }} + {%- elif trigger.entity_id == entity28 -%} {{ entity28_name }} + {%- elif trigger.entity_id == entity29 -%} {{ entity29_name }} + {%- elif trigger.entity_id == entity30 -%} {{ entity30_name }} + {%- elif trigger.entity_id == entity31 -%} {{ entity31_name }} + {%- elif trigger.entity_id == entity32 -%} {{ entity32_name }} + {%- endif -%} + btn_bri_txt: >- + {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' and trigger.to_state.attributes.brightness is defined -%} {{ (trigger.to_state.attributes.brightness | int * 100 /255) | round(0) }}% + {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' and trigger.to_state.attributes.current_position is defined -%} {{ (trigger.to_state.attributes.current_position | int) | round(0) }}% + {%- else -%} 0 + {%- endif -%} + + ##### Button PIC ##### + - service: "{{ command_printf }}" data: - component: home.a02 - message: "{{ date0_de }}" - - service: "{{ command_text_printf }}" - data: - component: weather01.a02 - message: "{{ date0_de }}" - - service: "{{ command_text_printf }}" - data: - component: weather02.a02 - message: "{{ date1_de }}" - - service: "{{ command_text_printf }}" - data: - component: weather03.a02 - message: "{{ date2_de }}" - - service: "{{ command_text_printf }}" - data: - component: weather04.a02 - message: "{{ date3_de }}" - - service: "{{ command_text_printf }}" - data: - component: weather05.a02 - message: "{{ date4_de }}" + cmd: "{{ component_to_update }}pic.pic={{ btn_pic }}" - ##### Date Home Page + Forcast EN ##### - - choose: - - conditions: - - condition: trigger - id: - # - nspanel_boot_language - - time_state - - condition: template - value_template: '{{ language == "EN" }}' - sequence: - - service: "{{ command_text_printf }}" + ##### TEXT Background ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_background_color }}" data: - component: home.a02 - message: "{{ date0_en }}" - - service: "{{ command_text_printf }}" - data: - component: weather01.a02 - message: "{{ date0_en }}" - - service: "{{ command_text_printf }}" - data: - component: weather02.a02 - message: "{{ date1_en }}" - - service: "{{ command_text_printf }}" - data: - component: weather03.a02 - message: "{{ date2_en }}" - - service: "{{ command_text_printf }}" - data: - component: weather04.a02 - message: "{{ date3_en }}" - - service: "{{ command_text_printf }}" - data: - component: weather05.a02 - message: "{{ date4_de }}" + component: "{{ component_to_update }}text" + message: "{{ btn_bg }}" - ##### Time Home Page Loading##### - - choose: - - conditions: - - condition: trigger - id: - # - nspanel_boot_entities - - time_state - sequence: + ##### TEXT Font Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_font_color }}" + data: + component: "{{ component_to_update }}text" + message: "{{ btn_txt_font }}" + + ##### BRIGHTNESS Background Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_background_color }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bg }}" + + ##### BRIGHTNESS Font Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_font_color }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bri_font }}" + + ##### "TEXT" Label ##### + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: - component: home.a01 - message: "{{ time }}" + component: "{{ component_to_update }}text" + message: "{{ btn_label }}" + + ##### "BRIGHTNESS" Text ##### + - if: + - condition: template + value_template: "{{ btn_bri_txt == 0 }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}bri" + message: " " + else: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bri_txt }}" + + ##### UPDATE LIGHTSETTING / COVERSETTING PAGE + - choose: + ##### LIGHTSETTINGS PAGE - LIGHT Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "light." }}' + sequence: + - choose: + ##### LIGHT ON / OFF + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "on" }}' + sequence: + ##### LIGHT PIC - ON ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_on }} + + ##### LIGHT Brightness Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' + + ##### LIGHT Temp Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.tempslider + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + ##### LIGHT Brightness Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }}%' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }}%' + + ##### LIGHT Temp Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + ##### LIGHT - OFF ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "off" }}' + sequence: + ##### LIGHT PIC - OFF ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_off }} + + ##### LIGHT Brightness Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '0' + + ##### LIGHT Brightness Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '0 %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '0 %' + + ##### COVERSETTINGS PAGE - COVER Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "cover." }}' + sequence: + ##### COVER OPEN ##### + - choose: + ##### Cover PIC - OPEN ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "open" }}' + sequence: + ##### COVER PIC - OPEN + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_open }} + + ##### Cover Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' + + ##### Cover Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' + + ##### Cover - Closed ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "closed" }}' + sequence: + ##### COVER PIC - CLOSED + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_closed }} + + ##### Cover Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '0' + + ##### Cover Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '0 %' - - - ################################################## - ##### ACTION - SHORT Press an LONG Press Button Page ########################################################################################################################################################## - ################################################## - - - - - - ##### ACTION - Page Button - SHORT Press - Toggle Enities ##### - - choose: + ##### Page Button - SHORT Press - Toggle Enities ##### DONE - conditions: - condition: trigger id: short_press @@ -3936,2935 +2265,1961 @@ action: - - - ################################################## - ##### ACTION - Light Setting Page ########################################################################################################################################################## - ################################################## - - - - - - ##### ACTION - Page Lightsettings - JUMP to Page Lightsettings and SYNC Light Settings ##### - - choose: + ##### Page Button - LONG Press - JUMP to Page Lightsettings / Coversettings ##### DONE - conditions: - condition: trigger id: long_press sequence: - ##### send some current Values to Cover Setting page ##### - - if: - - condition: template - value_template: '{{ entity_long is match "light." }}' - then: - - service: "{{ command_printf }}" - data: - cmd: page lightsettings - - delay: - milliseconds: 5 - - service: "{{ command_value }}" - data: - component: lightsettings.lightslider - message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' - - delay: - milliseconds: 10 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_name - message: '{{ entity_long_name }}' - - delay: - milliseconds: 15 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value - message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' - - delay: - milliseconds: 20 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value_2 - message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' - ##### Light PIC - ON ##### - - if: - - condition: template - value_template: '{{ states(entity_long) == "on" }}' - then: - - delay: - milliseconds: 25 - - service: "{{ command_printf }}" - data: - cmd: lightsettings.light_status.pic={{ light_pic_on }} - ##### Light PIC - OFF ##### - - if: - - condition: template - value_template: '{{ states(entity_long) == "off" }}' - then: - - delay: - milliseconds: 25 - - service: "{{ command_printf }}" - data: - cmd: lightsettings.light_status.pic={{ light_pic_off }} - ##### Check Color_Temp Value is available when yes send some current Values ##### - - if: - - condition: template - value_template: "{{ state_attr(entity_long, 'color_temp') != none }}" - then: - - delay: - milliseconds: 30 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - - delay: - milliseconds: 35 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value_2 - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - - delay: - milliseconds: 40 - - service: "{{ command_value }}" - data: - component: lightsettings.tempslider - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - choose: + ##### LONG Press - LIGHT Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "light." }}' + sequence: + ##### LIGHT Generel Values ##### + - service: "{{ command_printf }}" + data: + cmd: page lightsettings + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_name + message: '{{ entity_long_name }}' + - delay: + milliseconds: "{{ delay_value }}" + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'brightness') != none }}" + then: + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' + else: + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '0' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '0 %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '0 %' + + ##### LIGHT Check Color_Temp Value is available when yes send some current Values ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'color_temp') != none }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.tempslider + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + ##### LIGHT ON / OFF ##### + - choose: + ##### LIGHT PIC - ON ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "on" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_on }} + + ##### LIGHT PIC - OFF ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "off" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_off }} + + ##### LONG Press - COVER Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "cover." }}' + sequence: + ##### COVER Generel Values ##### + - service: "{{ command_printf }}" + data: + cmd: page coversettings + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_name + message: '{{ entity_long_name }}' + + ##### COVER Battery ICON Yes / NO ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'battery') != none }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.battery_value + message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.battery_icon.pic={{ battery_icon }} + + ##### COVER OPEN / CLOSE + - choose: + ##### COVER PIC - open ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "open" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_open }} + + ##### COVER PIC - Closed + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "closed" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_closed }} + - - - - ##### ACTION - Page Lightsettings - Changes from HA ##### - - choose: - - conditions: - - condition: trigger - id: - - current_state_entity01 - - current_state_entity02 - - current_state_entity03 - - current_state_entity04 - - current_state_entity05 - - current_state_entity06 - - current_state_entity07 - - current_state_entity08 - - current_state_entity09 - - current_state_entity10 - - current_state_entity11 - - current_state_entity12 - - current_state_entity13 - - current_state_entity14 - - current_state_entity15 - - current_state_entity16 - - current_state_entity17 - - current_state_entity18 - - current_state_entity19 - - current_state_entity20 - - current_state_entity21 - - current_state_entity22 - - current_state_entity23 - - current_state_entity24 - - current_state_entity25 - - current_state_entity26 - - current_state_entity27 - - current_state_entity28 - - current_state_entity29 - - current_state_entity30 - - current_state_entity31 - - current_state_entity32 - sequence: - ##### Light PIC - ON ##### - - if: - - condition: template - value_template: '{{ states(entity_long) == "on" }}' - then: - - delay: - milliseconds: 5 - - service: "{{ command_printf }}" - data: - cmd: lightsettings.light_status.pic={{ light_pic_on }} - ##### Light PIC - OFF ##### - - if: - - condition: template - value_template: '{{ states(entity_long) == "off" }}' - then: - - delay: - milliseconds: 5 - - service: "{{ command_printf }}" - data: - cmd: lightsettings.light_status.pic={{ light_pic_off }} - ##### Brightness Slider HA Sync - YES ##### - - if: - - condition: template - value_template: '{{ entity_long is match "light." and sync_slider_ha == "select_yes" }}' - then: - - delay: - milliseconds: 5 - - service: "{{ command_value }}" - data: - component: lightsettings.lightslider - message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' - ##### Temp Slider HA Sync - YES ##### - - if: - - condition: template - value_template: '{{ state_attr(entity_long, "color_temp") != none and sync_slider_ha == "select_yes" }}' - then: - - delay: - milliseconds: 10 - - service: "{{ command_value }}" - data: - component: lightsettings.tempslider - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - ##### Brightness Value HA Sync - YES ##### - - if: - - condition: template - value_template: '{{ entity_long is match "light." and sync_value_ha == "select_yes" }}' - then: - - delay: - milliseconds: 10 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value - message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' - - delay: - milliseconds: 15 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value_2 - message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' - ##### Temp Value HA Sync - YES ##### - - if: - - condition: template - value_template: '{{ state_attr(entity_long, "color_temp") != none and sync_value_ha == "select_yes" }}' - then: - - delay: - milliseconds: 20 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - - delay: - milliseconds: 25 - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value_2 - message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' - - - - - - ##### ACTION - Page Lightsettings - Brightness Slider MOVE ##### - - choose: + ##### LAST_CLICK_LIGHTSETTINGS - Changes on page Light-Settings ##### DONE - conditions: - condition: trigger id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) is match "brightness\d+" }}' sequence: - - service: light.turn_on - data: - entity_id: "{{ entity_long }}" - brightness: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}' - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value - message: '{{ ((states(last_click_lightsettings) |replace("brightness","") | int) * 100 /255) |round(0) }} %' - - service: "{{ command_text_printf }}" - data: - component: lightsettings.light_value_2 - message: '{{ ((states(last_click_lightsettings) |replace("brightness","") | int) * 100 /255) |round(0) }} %' + - choose: + ##### Page Lightsettings - Brightness Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "brightness\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + brightness: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (states(last_click_lightsettings) |replace("brightness","") | int * 100 /255) |round(0) }}%' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (states(last_click_lightsettings) |replace("brightness","") | int * 100 /255) |round(0) }}%' + + ##### Page Lightsettings - color_Temp Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "colortemp\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + color_temp: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + + ##### Page Lightsettings - Color RGB Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "\d+,\d+,\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + rgb_color: '{{ states(last_click_lightsettings).split(",") }}' + + ##### Page Lightsettings - Close Lightsetting Page ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) == "releaselightsettingsclose" }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "{{ entity_back }}" - - - ##### ACTION - Page Lightsettings - color_Temp Slider MOVE ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) is match "colortemp\d+" }}' - sequence: - - service: light.turn_on - data: - entity_id: "{{ entity_long }}" - color_temp: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value - message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' - - service: "{{ command_text_printf }}" - data: - component: lightsettings.temp_value_2 - message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' - - - - - - ##### ACTION - Page Lightsettings - Color RGB Slider MOVE ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) is match "\d+,\d+,\d+" }}' - sequence: - - service: light.turn_on - data: - entity_id: "{{ entity_long }}" - rgb_color: '{{ states(last_click_lightsettings).split(",") }}' - - - - - - ##### ACTION - Page Lightsettings - Close Lightsetting Page ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) == "releaselightsettingsclose" }}' - sequence: - - service: "{{ command_printf }}" - data: - cmd: "{{ entity_back }}" - - - - - - ################################################## - ##### ACTION - Cover Setting Page ########################################################################################################################################################## - ################################################## - - - - - - ##### ACTION - Page Coversettings - JUMP to Page Coversettings and SYNC Cover Settings ##### - - choose: - - conditions: - - condition: trigger - id: long_press - sequence: - ##### send some current Values to Cover Setting page ##### - - if: - - condition: template - value_template: '{{ entity_long is match "cover." }}' - then: - - service: "{{ command_printf }}" - data: - cmd: page coversettings - - delay: - milliseconds: 2 - - service: "{{ command_value }}" - data: - component: coversettings.coverslider - message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' - - delay: - milliseconds: 3 - - service: "{{ command_text_printf }}" - data: - component: coversettings.cover_value - message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' - - delay: - milliseconds: 4 - - service: "{{ command_text_printf }}" - data: - component: coversettings.cover_name - message: '{{ entity_long_name }}' - ##### Cover PIC - open ##### - - if: - - condition: template - value_template: '{{ states(entity_long) == "open" }}' - then: - - delay: - milliseconds: 5 - - service: "{{ command_printf }}" - data: - cmd: coversettings.cover_status.pic={{ cover_pic_open }} - ##### Cover PIC - Closed - - if: - - condition: template - value_template: '{{ states(entity_long) == "closed" }}' - then: - - delay: - milliseconds: 6 - - service: "{{ command_printf }}" - data: - cmd: coversettings.cover_status.pic={{ cover_pic_closed }} - ##### Cover Battery ICON Yes / NO ##### - - if: - - condition: template - value_template: "{{ state_attr(entity_long, 'battery') != none }}" - then: - - delay: - milliseconds: 7 - - service: "{{ command_text_printf }}" - data: - component: coversettings.battery_value - message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %' - - service: "{{ command_printf }}" - data: - cmd: coversettings.battery_icon.pic={{ battery_icon }} - - - - - - ##### ACTION - Page Coversettings - Changes from HA ##### - - choose: - - conditions: - - condition: trigger - id: - - current_state_entity01 - - current_state_entity02 - - current_state_entity03 - - current_state_entity04 - - current_state_entity05 - - current_state_entity06 - - current_state_entity07 - - current_state_entity08 - - current_state_entity09 - - current_state_entity10 - - current_state_entity11 - - current_state_entity12 - - current_state_entity13 - - current_state_entity14 - - current_state_entity15 - - current_state_entity16 - - current_state_entity17 - - current_state_entity18 - - current_state_entity19 - - current_state_entity20 - - current_state_entity21 - - current_state_entity22 - - current_state_entity23 - - current_state_entity24 - - current_state_entity25 - - current_state_entity26 - - current_state_entity27 - - current_state_entity28 - - current_state_entity29 - - current_state_entity30 - - current_state_entity31 - - current_state_entity32 - sequence: - ##### Cover PIC - open - - if: - - condition: template - value_template: '{{ states(entity_long) == "open" }}' - then: - - delay: - milliseconds: 1 - - service: "{{ command_printf }}" - data: - cmd: coversettings.cover_status.pic={{ cover_pic_open }} - ##### Cover PIC - Closed ##### - - if: - - condition: template - value_template: '{{ states(entity_long) == "closed" }}' - then: - - delay: - milliseconds: 1 - - service: "{{ command_printf }}" - data: - cmd: coversettings.cover_status.pic={{ cover_pic_closed }} - ##### Cover Slider HA Sync - YES ##### - - if: - - condition: template - value_template: '{{ entity_long is match "cover." and sync_slider_ha == "select_yes" }}' - then: - - delay: - milliseconds: 2 - - service: "{{ command_value }}" - data: - component: lightsettings.lightslider - message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' - ##### Cover Value HA Sync - YES ##### - - if: - - condition: template - value_template: '{{ entity_long is match "cover." and sync_value_ha == "select_yes" }}' - then: - - delay: - milliseconds: 3 - - service: "{{ command_text_printf }}" - data: - component: coversettings.cover_value - message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' - - - - - - ##### ACTION - Page Coversettings - Cover Slider MOVE ##### - - choose: - - conditions: - - condition: trigger - id: - - cover_settings - sequence: - - if: - - condition: template - value_template: '{{ states(last_click_coversettings) is match "coverposition\d+" }}' - then: - - service: cover.set_cover_position - data: - entity_id: "{{ entity_long }}" - position: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}' - - service: "{{ command_text_printf }}" - data: - component: coversettings.cover_value - message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' - - service: "{{ command_text_printf }}" - data: - component: coversettings.cover_value_2 - message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' - - - - - - ##### ACTION - Page Coversettings - UP / DOWN / STOP Cover ##### - - choose: + ##### LAST_CLICK_COVERSETTINGS - Changes on page Cover-Settings ##### DONE - conditions: - condition: trigger id: cover_settings sequence: - ##### COVER CLOSE Button ##### - - if: - - condition: template - value_template: '{{ states(last_click_coversettings) == "cover_close_press" }}' - then: - - service: cover.close_cover - data: - entity_id: "{{ entity_long }}" - ##### COVER OPEN Button ##### - - if: - - condition: template - value_template: '{{ states(last_click_coversettings) == "cover_open_press" }}' - then: - - service: cover.open_cover - data: - entity_id: "{{ entity_long }}" - ##### COVER STOP Button ##### - - if: - - condition: template - value_template: '{{ states(last_click_coversettings) == "cover_stop_press" }}' - then: - - service: cover.stop_cover - data: - entity_id: "{{ entity_long }}" + - choose: + ##### Page Coversettings - Cover Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) is match "coverposition\d+" }}' + sequence: + - service: cover.set_cover_position + data: + entity_id: "{{ entity_long }}" + position: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value_2 + message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' + + ##### Page Coversettings - Cover CLOSE Button ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_close_press" }}' + sequence: + - service: cover.close_cover + data: + entity_id: "{{ entity_long }}" + + ##### Page Coversettings - Cover OPEN Button ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_open_press" }}' + sequence: + - service: cover.open_cover + data: + entity_id: "{{ entity_long }}" + + ##### Page Coversettings - Cover STOP Button ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_stop_press" }}' + sequence: + - service: cover.stop_cover + data: + entity_id: "{{ entity_long }}" + + ##### Page Coversettings - Close Coversettings Page ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "releasecoversettingsclose" }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "{{ entity_back }}" - - - - ##### ACTION - Page Coversettings - Close Coversettings ##### - - choose: + ##### Left button press ##### DONE - conditions: - condition: trigger - id: cover_settings - - condition: template - value_template: '{{ states(last_click_coversettings) == "releasecoversettingsclose" }}' + id: left_button_press sequence: - - service: "{{ command_printf }}" + - service: >- + {% if left_button_entity is match 'light.' %} + light.toggle + {% elif left_button_entity is match 'switch.' %} + switch.toggle + {% elif left_button_entity is match 'cover.' %} + cover.toggle + {% elif left_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% endif %} data: - cmd: "{{ entity_back }}" + entity_id: "{{ left_button_entity }}" - - - ################################################## - ##### ACTION - Cover Setting Page ########################################################################################################################################################## - ################################################## - - - - - - - #### ACTION - TFT Upload Automation ##### - - choose: + ##### Right button press ##### DONE - conditions: - condition: trigger - id: tft_upload + id: right_button_press sequence: - - delay: - seconds: 2 - - service: "{{ tft_upload }}" - data: {} + - service: >- + {% if right_button_entity is match 'light.' %} + light.toggle + {% elif right_button_entity is match 'switch.' %} + switch.toggle + {% elif right_button_entity is match 'cover.' %} + cover.toggle + {% elif right_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% endif %} + data: + entity_id: "{{ right_button_entity }}" - ##### Humidity ##### - - choose: + + + ##### Date and Time Home Page ##### DONE - conditions: - condition: trigger - id: - # - nspanel_boot_entities - - humidity_state + id: time_state + sequence: + ##### Time Home Page ##### + - service: "{{ command_text_printf }}" + data: + component: home.a01 + message: "{{ time }}" + + - choose: + ##### Date Home Page + Forcast DE ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date01_de }}" + + ##### Date Home Page + Forcast EN ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date0_en }}" + + + + ##### Humidity ##### DONE + - conditions: + - condition: trigger + id: humidity_state sequence: - service: "{{ command_text_printf }}" data: component: home.a04 message: "{{ states(humidity) |round(0) }}%" - ##### Hotwater Temp ##### - - choose: + + + ##### Hotwater Temp ##### DONE - conditions: - condition: trigger - id: - # - nspanel_boot_entities - - hotwatertemp_state - - condition: template - value_template: '{{ hotwatertemp is match "sensor." }}' + id: hotwatertemp_state sequence: - service: "{{ command_text_printf }}" data: component: home.a07 message: "{{ states(hotwatertemp) |round(1) }}°" + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: thermostat.a08 message: "{{ states(hotwatertemp) |round(1) }}°" + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" data: cmd: home.p01.pic=68 - ##### Outdoor Temp Entity ##### - - choose: + + + ##### Outdoor Temp Entity ##### DONE - conditions: - condition: trigger - id: - # - nspanel_boot_entities - - outdoortemp_state - - condition: template - value_template: '{{ outdoortemp is match "sensor." }}' + id: outdoortemp_state sequence: - service: "{{ command_text_printf }}" data: component: home.a06 message: "{{ states(outdoortemp) |round(0) }}°" + - delay: + milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: thermostat.a07 message: "{{ states(outdoortemp) |round(0) }}°" - ##### Outdoor Temp Meteorologisk ##### - - choose: + + ##### Outdoor Temp Weather Integration ##### DONE - conditions: - condition: trigger - id: - # - nspanel_boot_entities - - weather_update_time - - condition: template - value_template: '{{ outdoortemp == "default" }}' + id: weather_temp_time sequence: - - service: "{{ command_text_printf }}" - data: - component: home.a06 - message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: thermostat.a07 - message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + - choose: + - conditions: + ##### Outdoor Temp Default ##### + - condition: template + value_template: '{{ outdoortemp != "sensor." and weather == "Default" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + + ##### Outdoor Temp Accuweather ##### + - conditions: + - condition: template + value_template: '{{ outdoortemp != "sensor." and weather == "AccuWeather" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" - ##### Outdoor Temp AccuWeather ##### - - choose: + + + ##### Weather Forcast ##### - conditions: - condition: trigger - id: - # - nspanel_boot_entities - - weather_update_time - - condition: template - value_template: '{{ outdoortemp == "accuweather" }}' + id: weather_settings sequence: - - service: "{{ command_text_printf }}" - data: - component: home.a06 - message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: thermostat.a07 - message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + - choose: + ##### Weather - DEFAULT HA ##### + - conditions: + - condition: template + value_template: '{{ weather == "Default" }}' + sequence: + - choose: + ##### Weather Page - 01 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather01" }}' + sequence: + - 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 }} + {%- endif -%} + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather01.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" - ######################################### - # - # - ############################################################# - ##### CLOSE - START - Action ##### - ############################################################# - # - ## - ### - ############################################################################################################################################################################################# - ### - ## - # - ############################################################# - ##### START - Weather Forcast Meteorologisk HA Default ##### - ############################################################# - # - # - ######################################### - - choose: - - conditions: - - condition: trigger - id: - # - nspanel_boot_weather - - weather_update_state - - weather_update_time - - condition: template - value_template: '{{ weather == "Default" }}' + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather01.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Home Page Symbole Home Meteorologisk HA Default ##### - sequence: - - if: - - condition: template - value_template: "{{states(ha_weather) == 'sunny'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=2 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'cloudy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=3 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=4 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'pouring'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=5 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'snowy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=6 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'hail'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'snowy-rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'fog'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=8 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'windy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'windy-variant'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'lightning'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=10 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'above_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=11 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'below_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=12 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'execptional' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'execptional' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(ha_weather) == 'clear-night'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=15 + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Today Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[0].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=15 + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 1 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[1].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=15 + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 2 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[2].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=15 + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_en }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 3 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[3].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=15 + ##### field 1 ##### - ##### Weather Forcast Day 4 Symbole Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(ha_weather,"forecast")[4].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=15 + ##### field 2 ##### - ##### Weather Forcast Today "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a04 ### Temperature MIN ### - message: " " - - service: "{{ command_text_printf }}" - data: - component: weather01.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value03 + message: '{{state_attr(ha_weather,"wind_speed") | round(0)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 1 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[1].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather02.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[1].temperature | round(0)}}°' + ##### field 4 ##### - ##### Weather Forcast Day 2 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[2].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather03.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[2].temperature | round(0)}}°' + ##### field 5 ##### - ##### Weather Forcast Day 3 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[3].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather04.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[3].temperature | round(0)}}°' + ##### Weather Page - 02 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather02" }}' + sequence: + - 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 }} + {%- endif -%} - ##### Weather Forcast Day 4 "TEMP" Home Meteorologisk HA Default ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a04 ### Temperature MIN ### - message: '{{state_attr(ha_weather,"forecast")[4].templow | round(0)}}°' - - service: "{{ command_text_printf }}" - data: - component: weather05.a05 ### Temperature MAX ### - message: '{{state_attr(ha_weather,"forecast")[4].temperature | round(0)}}°' + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather02.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" - ################################################################################ - ##### Weather Forcast Details Home Meteorologisk HA Default ################################### - ################################################################################ - - choose: - - conditions: - - condition: trigger - id: weather_update_state - - condition: template - value_template: '{{ weather == "Default" }}' + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather02.temp_min ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[0].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Today "Details" Home Meteorologisk HA Default ##### - sequence: - - if: - - condition: template - value_template: '{{states(last_click) == "weather01"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a06 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather01.p06.pic=53 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a07 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather01.p07.pic=53 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a08 - message: '{{state_attr(ha_weather,"wind_speed") | round(0)}} km/h' - - service: "{{ command_printf }}" - data: - cmd: weather01.p08.pic=63 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a09 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather01.p09.pic=53 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a10 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather01.p10.pic=53 + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather02.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[0].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 1 "Details" Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather02"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a06 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather02.p06.pic=53 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a07 - message: '{{state_attr(ha_weather,"forecast")[0].precipitation| round(1)}} mm' - - service: "{{ command_printf }}" - data: - cmd: weather02.p07.pic=59 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a08 - message: '{{state_attr(ha_weather,"forecast")[0].wind_speed | round(0)}} km/h' - - service: "{{ command_printf }}" - data: - cmd: weather02.p08.pic=63 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a09 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather02.p09.pic=53 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a10 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather02.p10.pic=53 + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 2 "Details" Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather03"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a06 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather03.p06.pic=53 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a07 - message: '{{state_attr(ha_weather,"forecast")[1].precipitation| round(1)}} mm' - - service: "{{ command_printf }}" - data: - cmd: weather03.p07.pic=59 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a08 - message: '{{state_attr(ha_weather,"forecast")[1].wind_speed | round(0)}} km/h' - - service: "{{ command_printf }}" - data: - cmd: weather03.p08.pic=63 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a09 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather03.p09.pic=53 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a10 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather03.p10.pic=53 + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 3 "Details" Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather04"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a06 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather04.p06.pic=53 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a07 - message: '{{state_attr(ha_weather,"forecast")[2].precipitation| round(1)}} mm' - - service: "{{ command_printf }}" - data: - cmd: weather04.p07.pic=59 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a08 - message: '{{state_attr(ha_weather,"forecast")[2].wind_speed | round(0)}} km/h' - - service: "{{ command_printf }}" - data: - cmd: weather04.p08.pic=63 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a09 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather04.p09.pic=53 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a10 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather04.p10.pic=53 + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 4 "Details" Home Meteorologisk HA Default ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather05"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a06 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather05.p06.pic=53 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a07 - message: '{{state_attr(ha_weather,"forecast")[3].precipitation| round(1)}} mm' - - service: "{{ command_printf }}" - data: - cmd: weather05.p07.pic=59 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a08 - message: '{{state_attr(ha_weather,"forecast")[3].wind_speed | round(0)}} km/h' - - service: "{{ command_printf }}" - data: - cmd: weather05.p08.pic=63 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a09 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather05.p09.pic=53 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a10 - message: " " - - service: "{{ command_printf }}" - data: - cmd: weather05.p10.pic=53 + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_en }}" + - delay: + milliseconds: "{{ delay_value }}" - ######################################### - # - # - ############################################################# - ##### CLOSE - Weather Forcast Meteorologisk HA Default ##### - ############################################################# - # - ## - ### - ############################################################################################################################################################################################# - ### - ## - # - ############################################################# - ##### START - Weather Forcast AccuWeather ##### - ############################################################# - # - # - ######################################### - - choose: - - conditions: - - condition: trigger - id: - # - nspanel_boot_weather - - weather_update_state - - weather_update_time - - condition: template - value_template: '{{ weather == "AccuWeather" }}' + ##### field 1 ##### - ##### Weather Home Page Symbole Home "AccuWeather" ##### - sequence: - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'sunny'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=2 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'cloudy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=3 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=4 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'pouring'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=5 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'snowy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=6 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'hail'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'snowy-rainy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=7 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'fog'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=8 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'windy'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'windy-variant'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=9 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'lightning'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=10 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'partlycloudy' and states('sun.sun') == 'above_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=11 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'partlycloudy' and states('sun.sun') == 'below_horizon' }}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=12 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'lightning-rainy' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'lightning-rainy' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'execptional' and states('sun.sun') == 'above_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=13 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'execptional' and states('sun.sun') == 'below_horizon'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=14 - - if: - - condition: template - value_template: "{{states(accuweather_home) == 'clear-night'}}" - then: - - service: "{{ command_printf }}" - data: - cmd: home.a05.pic=15 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value02 + message: '{{state_attr(ha_weather,"forecast")[0].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Today Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[0].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather01.a03.pic=15 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value03 + message: '{{state_attr(ha_weather,"forecast")[0].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 1 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[1].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather02.a03.pic=15 + ##### field 4 ##### - ##### Weather Forcast Day 2 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[2].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather03.a03.pic=15 + ##### field 5 ##### - ##### Weather Forcast Day 3 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[3].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather04.a03.pic=15 + ##### Weather Page - 03 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather03" }}' + sequence: + - 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 }} + {%- endif -%} - ##### Weather Forcast Day 4 Symbole "AccuWeather" ##### - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''sunny''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=2 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''cloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=3 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=4 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''pouring''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=5 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''snowy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=6 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''hail''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''snowy-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=7 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''fog''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=8 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''windy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''windy-variant''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=9 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''lightning''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=10 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''partlycloudy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=11 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''lightning-rainy''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''execptional''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=13 - - if: - - condition: template - value_template: - '{{state_attr(accuweather_home,"forecast")[4].condition - == ''clear-night''}}' - then: - - service: "{{ command_printf }}" - data: - cmd: weather05.a03.pic=15 + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather03.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Today "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_0d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather01.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather03.temp_min ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[1].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 1 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_1d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather02.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_1d) | round(0)}}°" + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather03.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[1].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 2 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_2d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather03.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_2d) | round(0)}}°" + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 3 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_3d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather04.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_3d) | round(0)}}°" + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 4 "TEMP" "AccuWeather" ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a04 ### Temperature MIN ### - message: "{{states(accuweather_realfeel_temperature_min_4d) | round(0)}}°" - - service: "{{ command_text_printf }}" - data: - component: weather05.a05 ### Temperature MAX ### - message: "{{states(accuweather_realfeel_temperature_max_4d) | round(0)}}°" + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" - ################################################################################ - ##### Weather Forcast Details "AccuWeather" ################################### - ################################################################################ - - choose: - - conditions: - - condition: trigger - id: weather_update_state - - condition: template - value_template: '{{ weather == "AccuWeather" }}' - ##### Weather Forcast Today Details "AccuWeather" ##### - sequence: - - if: - - condition: template - value_template: '{{states(last_click) == "weather01"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a06 - message: "{{ state_attr(accuweather_home,'forecast')[0].precipitation_probability}} %" - - service: "{{ command_printf }}" - data: - cmd: weather01.p06.pic=59 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a07 - message: "{{states(accuweather_hours_of_sun_0d) | round(0)}} h" - - service: "{{ command_printf }}" - data: - cmd: weather01.p07.pic=60 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a08 - message: "{{state_attr(accuweather_uv_index_0d, 'level')}} {{states(accuweather_uv_index_0d) | round(0)}}" - - service: "{{ command_printf }}" - data: - cmd: weather01.p08.pic=61 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a09 - message: "{{states(accuweather_thunderstorm_probability_day_0d) | round(0)}} %" - - service: "{{ command_printf }}" - data: - cmd: weather01.p09.pic=62 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.a10 - message: "{{states(accuweather_wind_day_0d) | round(0)}} km/h" - - service: "{{ command_printf }}" - data: - cmd: weather01.p10.pic=63 + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_en }}" + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 1 Details "AccuWeather" ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather02"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a06 - message: "{{ state_attr(accuweather_home,'forecast')[1].precipitation_probability}} %" - - service: "{{ command_printf }}" - data: - cmd: weather02.p06.pic=59 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a07 - message: "{{states(accuweather_hours_of_sun_1d) | round(0)}} h" - - service: "{{ command_printf }}" - data: - cmd: weather02.p07.pic=60 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a08 - message: "{{state_attr(accuweather_uv_index_1d, 'level')}} {{states(accuweather_uv_index_1d) | round(0)}}" - - service: "{{ command_printf }}" - data: - cmd: weather02.p08.pic=61 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a09 - message: "{{states(accuweather_thunderstorm_probability_day_1d) | round(0)}} %" - - service: "{{ command_printf }}" - data: - cmd: weather02.p09.pic=62 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.a10 - message: "{{states(accuweather_wind_day_1d) | round(0)}} km/h" - - service: "{{ command_printf }}" - data: - cmd: weather02.p10.pic=63 + ##### field 1 ##### - ##### Weather Forcast Day 2 Details "AccuWeather" ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather03"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a06 - message: "{{ state_attr(accuweather_home,'forecast')[2].precipitation_probability}} %" - - service: "{{ command_printf }}" - data: - cmd: weather03.p06.pic=59 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a07 - message: "{{states(accuweather_hours_of_sun_2d) | round(0)}} h" - - service: "{{ command_printf }}" - data: - cmd: weather03.p07.pic=60 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a08 - message: "{{state_attr(accuweather_uv_index_2d, 'level')}} {{states(accuweather_uv_index_2d) | round(0)}}" - - service: "{{ command_printf }}" - data: - cmd: weather03.p08.pic=61 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a09 - message: "{{states(accuweather_thunderstorm_probability_day_2d) | round(0)}} %" - - service: "{{ command_printf }}" - data: - cmd: weather03.p09.pic=62 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.a10 - message: "{{states(accuweather_wind_day_2d) | round(0)}} km/h" - - service: "{{ command_printf }}" - data: - cmd: weather03.p10.pic=63 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value02 + message: '{{state_attr(ha_weather,"forecast")[1].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 3 Details "AccuWeather" ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather04"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a06 - message: "{{ state_attr(accuweather_home,'forecast')[3].precipitation_probability}} %" - - service: "{{ command_printf }}" - data: - cmd: weather04.p06.pic=59 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a07 - message: "{{states(accuweather_hours_of_sun_3d) | round(0)}} h" - - service: "{{ command_printf }}" - data: - cmd: weather04.p07.pic=60 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a08 - message: "{{state_attr(accuweather_uv_index_3d, 'level')}} {{states(accuweather_uv_index_3d) | round(0)}}" - - service: "{{ command_printf }}" - data: - cmd: weather04.p08.pic=61 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a09 - message: "{{states(accuweather_thunderstorm_probability_day_3d) | round(0)}} %" - - service: "{{ command_printf }}" - data: - cmd: weather04.p09.pic=62 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.a10 - message: "{{states(accuweather_wind_day_3d) | round(0)}} km/h" - - service: "{{ command_printf }}" - data: - cmd: weather04.p10.pic=63 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value03 + message: '{{state_attr(ha_weather,"forecast")[1].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" - ##### Weather Forcast Day 4 Details "AccuWeather" ##### - - if: - - condition: template - value_template: '{{states(last_click) == "weather05"}}' - then: - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a06 - message: "{{ state_attr(accuweather_home,'forecast')[4].precipitation_probability}} %" - - service: "{{ command_printf }}" - data: - cmd: weather05.p06.pic=59 - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a07 - message: "{{states(accuweather_hours_of_sun_4d) | round(0)}} h" - - service: "{{ command_printf }}" - data: - cmd: weather05.p07.pic=60 - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a08 - message: "{{state_attr(accuweather_uv_index_4d, 'level')}} {{states(accuweather_uv_index_4d) | round(0)}}" - - service: "{{ command_printf }}" - data: - cmd: weather05.p08.pic=61 - ##### field 4 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a09 - message: "{{states(accuweather_thunderstorm_probability_day_4d) | round(0)}} %" - - service: "{{ command_printf }}" - data: - cmd: weather05.p09.pic=62 - ##### field 5 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.a10 - message: "{{states(accuweather_wind_day_4d) | round(0)}} km/h" - - service: "{{ command_printf }}" - data: - cmd: weather05.p10.pic=63 + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather Page - 04 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather04" }}' + sequence: + - 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather04.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_min ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[2].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[2].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value02 + message: '{{state_attr(ha_weather,"forecast")[2].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value03 + message: '{{state_attr(ha_weather,"forecast")[2].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather Page - 05 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather05" }}' + sequence: + - 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather05.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_min ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[3].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[3].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value02 + message: '{{state_attr(ha_weather,"forecast")[3].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value03 + message: '{{state_attr(ha_weather,"forecast")[3].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather - Accuweather ##### + - conditions: + - condition: template + value_template: '{{ weather == "AccuWeather" }}' + sequence: + - choose: + ##### Weather Page - 01 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather01" }}' + sequence: + - 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather01.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather01.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_0d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather01.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value01 + message: "{{ state_attr(accuweather_value,'forecast')[0].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value02 + message: "{{states(accuweather_hours_of_sun_0d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value03 + message: "{{state_attr(accuweather_uv_index_0d, 'level')}} {{states(accuweather_uv_index_0d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value04 + message: "{{states(accuweather_thunderstorm_probability_day_0d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value05 + message: "{{states(accuweather_wind_day_0d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 02 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather02" }}' + sequence: + - 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather02.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather02.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_1d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather02.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_1d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value01 + message: "{{ state_attr(accuweather_value,'forecast')[1].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value02 + message: "{{states(accuweather_hours_of_sun_1d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value03 + message: "{{state_attr(accuweather_uv_index_1d, 'level')}} {{states(accuweather_uv_index_1d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value04 + message: "{{states(accuweather_thunderstorm_probability_day_1d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value05 + message: "{{states(accuweather_wind_day_1d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 03 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather03" }}' + sequence: + - 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather03.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather03.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_2d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather03.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_2d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value01 + message: "{{ state_attr(accuweather_value,'forecast')[2].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value02 + message: "{{states(accuweather_hours_of_sun_2d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value03 + message: "{{state_attr(accuweather_uv_index_2d, 'level')}} {{states(accuweather_uv_index_2d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value04 + message: "{{states(accuweather_thunderstorm_probability_day_2d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value05 + message: "{{states(accuweather_wind_day_2d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 04 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather04" }}' + sequence: + - 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather04.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_3d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_3d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value01 + message: "{{ state_attr(accuweather_value,'forecast')[3].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value02 + message: "{{states(accuweather_hours_of_sun_3d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value03 + message: "{{state_attr(accuweather_uv_index_3d, 'level')}} {{states(accuweather_uv_index_3d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value04 + message: "{{states(accuweather_thunderstorm_probability_day_3d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value05 + message: "{{states(accuweather_wind_day_3d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 05 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather05" }}' + sequence: + - 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 }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather05.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_4d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_4d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value01 + message: "{{ state_attr(accuweather_value,'forecast')[4].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value02 + message: "{{states(accuweather_hours_of_sun_4d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value03 + message: "{{state_attr(accuweather_uv_index_4d, 'level')}} {{states(accuweather_uv_index_4d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value04 + message: "{{states(accuweather_thunderstorm_probability_day_4d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value05 + message: "{{states(accuweather_wind_day_4d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value05_pic.pic={{ weather_icon_wind }} -######################################### -# -# ############################################################# -##### CLOSE - Weather Forcast AccuWeather ##### -############################################################# -# -## -### -############################################################################################################################################################################################# - +##### CLOSE - Action ##### +############################################################# \ No newline at end of file diff --git a/esphome.yaml b/esphome.yaml index 73cf7e6..7470765 100644 --- a/esphome.yaml +++ b/esphome.yaml @@ -119,6 +119,9 @@ button: name: $device_name Restart id: restart_nspanel + + + ######################################### # # @@ -308,6 +311,11 @@ binary_sensor: # on_click: # - switch.toggle: relay_2 + + + + + ##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA ##### - platform: nextion name: $device_name Climate Target DOWN @@ -814,7 +822,17 @@ text_sensor: name: $device_name last click coversettings id: disp1_last_click_coversettings update_interval: 50ms - component_name: coverposition + component_name: coversetting + +##### last click weather page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: $device_name last click weathersettings + id: disp1_last_click_weathersettings + update_interval: 50ms + component_name: weathersetting + + ##### Wochentag SENSOR FROM HA ##### # - platform: homeassistant