diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 9406f7a..42a4698 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -2354,11 +2354,6 @@ trigger_variables: notification_text: "sensor.{{ nspanel_name }}_notification_text" notification_label: "sensor.{{ nspanel_name }}_notification_label" - ##### WEATHER Trigger ##### - weather: !input "weather" - weather_entity: !input "weather_entity" - accuweather_name: '{{ weather_entity |replace("weather.","") }}' - variables: ##### GENERAL ##### blueprint_version: "3.2.1" @@ -2371,6 +2366,52 @@ variables: notification_sound: "switch.{{ nspanel_name }}_notification_sound" confirmation_message: "switch.{{ nspanel_name }}_confirmation_message" + ##### Nextion dict #### + nextion: + icons: + weather: + lightning: "\U0000E592" #E592 + protect: "\U0000F05C" #F05C + rain: "\U0000E595" #E595 + sun: "\U0000E5A7" #E5A7 + wind: "\U0000E59C" #E59C + pics: + weather: + sunny: "{{ '2' if is_state('sun.sun', 'above_horizon') else '15'}}" #some weather providers returns 'sunny' for 'clear-night' + cloudy: "3" + rainy: "4" + pouring: "5" + snowy: "6" + hail: "7" + snowy_rainy: "7" + fog: "8" + windy: "9" + windy_variant: "9" + lightning: "10" + partlycloudy: "{{ '11' if is_state('sun.sun', 'above_horizon') else '12'}}" + lightning_rainy: "{{ '13' if is_state('sun.sun', 'above_horizon') else '14'}}" + execptional: "{{ '13' if is_state('sun.sun', 'above_horizon') else '14'}}" + clear_night: "15" + unknown: "" + unavailable: "" + + ##### WEATHER #### + weather_entity: !input "weather_entity" # used only during the creation of weather in variables + weather: + type: !input "weather" + entity: !input "weather_entity" + name: '{{ weather_entity | replace("weather.","") }}' # used only during the creation of accuweather in variables + units: + hours_of_sun: "{{ state_attr(weather_entity, 'hours_of_sun_unit') if state_attr(weather_entity, 'hours_of_sun_unit') else 'h' }}" + precipitation: "{{ state_attr(weather_entity, 'precipitation_unit') if state_attr(weather_entity, 'precipitation_unit') else 'mm' }}" + precipitation_probability: "{{ state_attr(weather_entity, 'precipitation_probability_unit') if state_attr(weather_entity, 'precipitation_probability_unit') else '%' }}" + pressure: "{{ state_attr(weather_entity, 'temperature_unit') if state_attr(weather_entity, 'pressure_unit') }}" + temperature: "{{ state_attr(weather_entity, 'temperature_unit') if state_attr(weather_entity, 'temperature_unit') else '°' }}" + thunderstorm_probability: "{{ state_attr(weather_entity, 'thunderstorm_probability_unit') if state_attr(weather_entity, 'thunderstorm_probability_unit') else '%' }}" + uv_index: "{{ state_attr(weather_entity, 'uv_index_unit') if state_attr(weather_entity, 'uv_index_unit') }}" + visibility: "{{ state_attr(weather_entity, 'visibility_unit') if state_attr(weather_entity, 'visibility_unit') }}" + wind_speed: "{{ state_attr(weather_entity, 'wind_speed_unit') if state_attr(weather_entity, 'wind_speed_unit') }}" + ##### PUSH TO NEXTION DISPLAY ##### command_text_printf: "esphome.{{ nspanel_name }}_send_command_text_printf" command_value: "esphome.{{ nspanel_name }}_send_command_value" @@ -2397,8 +2438,6 @@ variables: tft_path: !input "tft_path" ##### GENERAL ENTITYS ##### - - hotwatertemp: !input "hotwatertemp" outdoortemp: !input "outdoortemp" indoortemp: !input "indoortemp" @@ -2453,28 +2492,6 @@ variables: # # flame_pic_off: "60" # top_menu_blank: "60" - - - - 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" - hotw_bt_blank: "79" hotw_bt_off: "80" hotw_bt_on: "81" @@ -2512,13 +2529,6 @@ variables: button_icon_fan: "\U0000E20F" #E20F button_icon_climate: "\U0000E392" #E392 - ###### "Weather" NEXTION FONT ICON MAPPING ##### - weather_icon_rain: "\U0000E595" #E595 - weather_icon_sun: "\U0000E5A7" #E5A7 - weather_icon_protect: "\U0000F05C" #F05C - weather_icon_lightning: "\U0000E592" #E592 - weather_icon_wind: "\U0000E59C" #E59C - ##### CHANGE ME END ########################################################################################################## @@ -3016,11 +3026,12 @@ variables: fri: Петък sat: Събота sun: Неделя - today: Днес - tomorrow: Утре - in_2_days: за 2 дни - in_3_days: за 3 дни - in_4_days: за 4 дни + relative_day: + today: Днес + tomorrow: Утре + in_2_days: за 2 дни + in_3_days: за 3 дни + in_4_days: за 4 дни climate: states: "on": на @@ -3036,11 +3047,12 @@ variables: fri: Pátek sat: Sobota sun: Neděle - today: Dnes - tomorrow: Zítra - in_2_days: za 2 dny - in_3_days: za 3 dny - in_4_days: za 4 dny + relative_day: + today: Dnes + tomorrow: Zítra + in_2_days: za 2 dny + in_3_days: za 3 dny + in_4_days: za 4 dny climate: states: "on": zapnuto @@ -3056,11 +3068,12 @@ variables: fri: Freitag sat: Samstag sun: Sonntag - today: Heute - tomorrow: Morgen - in_2_days: in 2 Tagen - in_3_days: in 3 Tagen - in_4_days: in 4 Tagen + relative_day: + today: Heute + tomorrow: Morgen + in_2_days: in 2 Tagen + in_3_days: in 3 Tagen + in_4_days: in 4 Tagen climate: states: "on": ein @@ -3076,11 +3089,12 @@ variables: fri: Fredag sat: Lørdag sun: Søndag - today: I dag - tomorrow: I morgen - in_2_days: om 2 dage - in_3_days: om 3 dage - in_4_days: om 4 dage + relative_day: + today: I dag + tomorrow: I morgen + in_2_days: om 2 dage + in_3_days: om 3 dage + in_4_days: om 4 dage climate: states: "on": på @@ -3096,11 +3110,12 @@ variables: fri: Friday sat: Saturday sun: Sunday - today: Today - tomorrow: Tomorrow - in_2_days: In 2 days - in_3_days: In 3 days - in_4_days: In 4 days + relative_day: + today: Today + tomorrow: Tomorrow + in_2_days: In 2 days + in_3_days: In 3 days + in_4_days: In 4 days climate: states: "on": on @@ -3116,11 +3131,12 @@ variables: fri: Viernes sat: Sábado sun: Domingo - today: Hoy - tomorrow: Mañana - in_2_days: en 2 Días - in_3_days: en 3 Días - in_4_days: en 4 Días + relative_day: + today: Hoy + tomorrow: Mañana + in_2_days: en 2 Días + in_3_days: en 3 Días + in_4_days: en 4 Días climate: states: "on": on @@ -3136,11 +3152,12 @@ variables: fri: Reede sat: Laupäev sun: Pühapäev - today: Täna - tomorrow: Homme - in_2_days: 2 päeva pärast - in_3_days: 3 päeva pärast - in_4_days: 4 päeva pärast + relative_day: + today: Täna + tomorrow: Homme + in_2_days: 2 päeva pärast + in_3_days: 3 päeva pärast + in_4_days: 4 päeva pärast climate: states: "on": aadressil @@ -3156,11 +3173,12 @@ variables: fri: Perjantai sat: Lauantai sun: Sunnuntai - today: Tänään - tomorrow: Huomenna - in_2_days: 2 päivän päästä - in_3_days: 3 päivän päästä - in_4_days: 4 päivän päästä + relative_day: + today: Tänään + tomorrow: Huomenna + in_2_days: 2 päivän päästä + in_3_days: 3 päivän päästä + in_4_days: 4 päivän päästä climate: states: "on": osoitteessa @@ -3176,11 +3194,12 @@ variables: fri: Vendredi sat: Samedi sun: Dimanche - today: Aujourd hui - tomorrow: Demain - in_2_days: Dans 2 jours - in_3_days: Dans 3 jours - in_4_days: Dans 4 jours + relative_day: + today: Aujourd hui + tomorrow: Demain + in_2_days: Dans 2 jours + in_3_days: Dans 3 jours + in_4_days: Dans 4 jours climate: states: "on": on @@ -3196,11 +3215,12 @@ variables: fri: Παρασκευή sat: Σάββατο sun: Κυριακή - today: Σήμερα - tomorrow: Αύριο - in_2_days: σε 2 ημέρες - in_3_days: σε 3 ημέρες - in_4_days: σε 4 ημέρες + relative_day: + today: Σήμερα + tomorrow: Αύριο + in_2_days: σε 2 ημέρες + in_3_days: σε 3 ημέρες + in_4_days: σε 4 ημέρες climate: states: "on": Ενεργό @@ -3216,11 +3236,12 @@ variables: fri: ישיש sat: תבש sun: ןושאר - today: םויה - tomorrow: רחמ - in_2_days: םיימוי דוע - in_3_days: םימי 3 דוע - in_4_days: םימי 4 דוע + relative_day: + today: םויה + tomorrow: רחמ + in_2_days: םיימוי דוע + in_3_days: םימי 3 דוע + in_4_days: םימי 4 דוע climate: states: "on": קולד @@ -3236,11 +3257,12 @@ variables: fri: Péntek sat: Szombat sun: Vasárnap - today: Ma - tomorrow: Holnap - in_2_days: 2 nap múlva - in_3_days: 3 nap múlva - in_4_days: 4 nap múlva + relative_day: + today: Ma + tomorrow: Holnap + in_2_days: 2 nap múlva + in_3_days: 3 nap múlva + in_4_days: 4 nap múlva climate: states: "on": a oldalon @@ -3256,11 +3278,12 @@ variables: fri: Jumat sat: Sabtu sun: Minggu - today: Hari ini - tomorrow: Besok - in_2_days: dalam 2 Hari - in_3_days: dalam 3 Hari - in_4_days: dalam 4 Hari + relative_day: + today: Hari ini + tomorrow: Besok + in_2_days: dalam 2 Hari + in_3_days: dalam 3 Hari + in_4_days: dalam 4 Hari climate: states: "on": on @@ -3276,11 +3299,12 @@ variables: fri: Venerdì sat: Sabato sun: Domenica - today: Oggi - tomorrow: Domani - in_2_days: in 2 giorni - in_3_days: in 3 giorni - in_4_days: in 4 giorni + relative_day: + today: Oggi + tomorrow: Domani + in_2_days: in 2 giorni + in_3_days: in 3 giorni + in_4_days: in 4 giorni climate: states: "on": on @@ -3296,11 +3320,12 @@ variables: fri: Penktadienis sat: Šeštadienis sun: Sekmadienis - today: Šiandien - tomorrow: Rytoj - in_2_days: per 2 dienas - in_3_days: per 3 dienas - in_4_days: per 4 dienas + relative_day: + today: Šiandien + tomorrow: Rytoj + in_2_days: per 2 dienas + in_3_days: per 3 dienas + in_4_days: per 4 dienas climate: states: "on": svetainėje @@ -3316,11 +3341,12 @@ variables: fri: Piektdiena sat: Sestdiena sun: Svētdiena - today: Šodien - tomorrow: Rīt - in_2_days: pēc 2 dienām - in_3_days: pēc 3 dienām - in_4_days: pēc 4 dienām + relative_day: + today: Šodien + tomorrow: Rīt + in_2_days: pēc 2 dienām + in_3_days: pēc 3 dienām + in_4_days: pēc 4 dienām climate: states: "on": vietnē @@ -3336,11 +3362,12 @@ variables: fri: Vrijdag sat: Zaterdag sun: Zondag - today: Vandaag - tomorrow: Morgen - in_2_days: in 2 dagen - in_3_days: in 3 dagen - in_4_days: in 4 dagen + relative_day: + today: Vandaag + tomorrow: Morgen + in_2_days: in 2 dagen + in_3_days: in 3 dagen + in_4_days: in 4 dagen climate: states: "on": aan @@ -3356,11 +3383,12 @@ variables: fri: Fredag sat: Lørdag sun: Søndag - today: I dag - tomorrow: I morgen - in_2_days: om 2 dager - in_3_days: om 3 dager - in_4_days: om 4 dager + relative_day: + today: I dag + tomorrow: I morgen + in_2_days: om 2 dager + in_3_days: om 3 dager + in_4_days: om 4 dager climate: states: "on": på @@ -3376,11 +3404,12 @@ variables: fri: Piątek sat: Sobota sun: Niedziela - today: Dzisiaj - tomorrow: Jutro - in_2_days: za 2 dni - in_3_days: za 3 dni - in_4_days: za 4 dni + relative_day: + today: Dzisiaj + tomorrow: Jutro + in_2_days: za 2 dni + in_3_days: za 3 dni + in_4_days: za 4 dni climate: states: "on": na @@ -3396,11 +3425,12 @@ variables: fri: Sexta-feira sat: Sábado sun: Domingo - today: Hoje - tomorrow: Amanhã - in_2_days: Em 2 dias - in_3_days: Em 3 dias - in_4_days: Em 4 dias + relative_day: + today: Hoje + tomorrow: Amanhã + in_2_days: Em 2 dias + in_3_days: Em 3 dias + in_4_days: Em 4 dias climate: states: "on": ligado @@ -3416,11 +3446,12 @@ variables: fri: Vineri sat: Sâmbătă sun: Duminică - today: Astăzi - tomorrow: Mâine - in_2_days: în 2 zile - in_3_days: în 3 zile - in_4_days: în 4 zile + relative_day: + today: Astăzi + tomorrow: Mâine + in_2_days: în 2 zile + in_3_days: în 3 zile + in_4_days: în 4 zile climate: states: "on": pe @@ -3436,11 +3467,12 @@ variables: fri: Пятница sat: Суббота sun: Воскресение - today: Сегодня - tomorrow: Завтра - in_2_days: на 2 дня - in_3_days: на 3 дня - in_4_days: на 4 дня + relative_day: + today: Сегодня + tomorrow: Завтра + in_2_days: на 2 дня + in_3_days: на 3 дня + in_4_days: на 4 дня climate: states: "on": включено @@ -3456,11 +3488,12 @@ variables: fri: Piatok sat: Sobota sun: Nedeľa - today: Dnes - tomorrow: Zajtra - in_2_days: o 2 dni - in_3_days: o 3 dni - in_4_days: o 4 dni + relative_day: + today: Dnes + tomorrow: Zajtra + in_2_days: o 2 dni + in_3_days: o 3 dni + in_4_days: o 4 dni climate: states: "on": zapnuté @@ -3476,11 +3509,12 @@ variables: fri: Petek sat: Sobota sun: Nedelja - today: Danes - tomorrow: Jutri - in_2_days: v 2 dneh - in_3_days: v 3 dneh - in_4_days: v 4 dneh + relative_day: + today: Danes + tomorrow: Jutri + in_2_days: v 2 dneh + in_3_days: v 3 dneh + in_4_days: v 4 dneh climate: states: "on": na @@ -3496,11 +3530,12 @@ variables: fri: Fredag sat: Lördag sun: Söndag - today: Idag - tomorrow: Imorgon - in_2_days: om 2 dagar - in_3_days: om 3 dagar - in_4_days: om 4 dagar + relative_day: + today: Idag + tomorrow: Imorgon + in_2_days: om 2 dagar + in_3_days: om 3 dagar + in_4_days: om 4 dagar climate: states: "on": på @@ -3516,11 +3551,12 @@ variables: fri: Cuma sat: Cumartesi sun: Pazar - today: Bugün - tomorrow: Yarın - in_2_days: 2 Gün İçinde - in_3_days: 3 Gün İçinde - in_4_days: 4 Gün İçinde + relative_day: + today: Bugün + tomorrow: Yarın + in_2_days: 2 Gün İçinde + in_3_days: 3 Gün İçinde + in_4_days: 4 Gün İçinde climate: states: "on": üzerinde @@ -3536,11 +3572,12 @@ variables: fri: п ятниця sat: Субота sun: Неділя - today: Сьогодні - tomorrow: Завтра - in_2_days: через 2 дні - in_3_days: через 3 дні - in_4_days: через 2 дні + relative_day: + today: Сьогодні + tomorrow: Завтра + in_2_days: через 2 дні + in_3_days: через 3 дні + in_4_days: через 2 дні climate: states: "on": увімк @@ -3555,53 +3592,6 @@ variables: mui_weekday_in_4_days: "{{ (dict.values(mui[language].weekdays) | list)[(now() + timedelta(days=4)).weekday()] ~ ', ' ~ as_timestamp(now() + timedelta(days=4)) | timestamp_custom(date_format) }}" #heat_mui: "{{ mui[language].climate.heat }}" - ##### FORCAST ACCUWEATHER - DAY 0 ##### - accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_0d" - accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_0d" - accuweather_hours_of_sun_0d: "sensor.{{ accuweather_name }}_hours_of_sun_0d" - accuweather_uv_index_0d: "sensor.{{ accuweather_name }}_uv_index_0d" - accuweather_thunderstorm_probability_day_0d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_0d" - accuweather_thunderstorm_probability_night_0d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_0d" - accuweather_wind_day_0d: "sensor.{{ accuweather_name }}_wind_day_0d" - accuweather_wind_night_0d: "sensor.{{ accuweather_name }}_wind_night_0d" - ##### FORCAST ACCUWEATHER - DAY 1 ##### - accuweather_realfeel_temperature_min_1d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_1d" - accuweather_realfeel_temperature_max_1d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_1d" - accuweather_hours_of_sun_1d: "sensor.{{ accuweather_name }}_hours_of_sun_1d" - accuweather_uv_index_1d: "sensor.{{ accuweather_name }}_uv_index_1d" - accuweather_thunderstorm_probability_day_1d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_1d" - accuweather_thunderstorm_probability_night_1d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_1d" - accuweather_wind_day_1d: "sensor.{{ accuweather_name }}_wind_day_1d" - accuweather_wind_night_1d: "sensor.{{ accuweather_name }}_wind_night_1d" - ##### FORCAST ACCUWEATHER - DAY 2 ##### - accuweather_realfeel_temperature_min_2d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_2d" - accuweather_realfeel_temperature_max_2d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_2d" - accuweather_hours_of_sun_2d: "sensor.{{ accuweather_name }}_hours_of_sun_2d" - accuweather_uv_index_2d: "sensor.{{ accuweather_name }}_uv_index_2d" - accuweather_thunderstorm_probability_day_2d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_2d" - accuweather_thunderstorm_probability_night_2d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_2d" - accuweather_wind_day_2d: "sensor.{{ accuweather_name }}_wind_day_2d" - accuweather_wind_night_2d: "sensor.{{ accuweather_name }}_wind_night_2d" - ##### FORCAST ACCUWEATHER - DAY 3 ##### - accuweather_realfeel_temperature_min_3d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_3d" - accuweather_realfeel_temperature_max_3d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_3d" - accuweather_hours_of_sun_3d: "sensor.{{ accuweather_name }}_hours_of_sun_3d" - accuweather_uv_index_3d: "sensor.{{ accuweather_name }}_uv_index_3d" - accuweather_thunderstorm_probability_day_3d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_3d" - accuweather_thunderstorm_probability_night_3d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_3d" - accuweather_wind_day_3d: "sensor.{{ accuweather_name }}_wind_day_3d" - accuweather_wind_night_3d: "sensor.{{ accuweather_name }}_wind_night_3d" - ##### FORCAST ACCUWEATHER - DAY 4 ##### - accuweather_realfeel_temperature_min_4d: "sensor.{{ accuweather_name }}_realfeel_temperature_min_4d" - accuweather_realfeel_temperature_max_4d: "sensor.{{ accuweather_name }}_realfeel_temperature_max_4d" - accuweather_hours_of_sun_4d: "sensor.{{ accuweather_name }}_hours_of_sun_4d" - accuweather_uv_index_4d: "sensor.{{ accuweather_name }}_uv_index_4d" - accuweather_thunderstorm_probability_day_4d: "sensor.{{ accuweather_name }}_thunderstorm_probability_day_4d" - accuweather_thunderstorm_probability_night_4d: "sensor.{{ accuweather_name }}_thunderstorm_probability_night_4d" - accuweather_wind_day_4d: "sensor.{{ accuweather_name }}_wind_day_4d" - accuweather_wind_night_4d: "sensor.{{ accuweather_name }}_wind_night_4d" - - ############################################################# ##### CLOSE - Variables ##### @@ -3658,7 +3648,7 @@ trigger: - platform: event event_type: state_changed event_data: - entity_id: '{{ weather_entity }}' + entity_id: !input "weather_entity" id: weather_state_change ##### HOME Value 01 - Trigger "home_value01_state" ##### @@ -4113,7 +4103,8 @@ action: ######################################################################################################################## # main - alias: "choose alias (name)" - - choose: + - alias: Main choices + choose: ##### JUMP TO - settings page lightsettings /coversettings / climate (SETTINGS ENTITY CHANGED) ##### - conditions: @@ -4202,30 +4193,21 @@ action: cmd: page home ##### PAGE CHANGED - changes when page changed ##### - - conditions: + - alias: Page changed + conditions: - condition: trigger id: current_page_changed sequence: ##### climate-page left - apply climate temperature if climate_optimistic ##### ## TODO - remove from here - if: - condition: template - value_template: '{{ trigger.event.data.old_state.state == page_climate }}' + value_template: '{{ trigger.event.data.old_state.state == page_climate and climate_optimistic and is_number(states(display_target_temperature)) and states(display_target_temperature) | float(0) != 0.0 }}' then: - - if: - - condition: template - value_template: '{{ climate_optimistic == true }}' - then: - - variables: - display_target_temperature: "{{states(display_target_temperature) | round(1)}}" - - if: - - condition: template - value_template: '{{ display_target_temperature != 0.0 }}' - then: - - service: climate.set_temperature - data: - entity_id: '{{ entity_long }}' - #hvac_mode: 'heat' - temperature: "{{ display_target_temperature }}" + - service: climate.set_temperature + data: + entity_id: '{{ entity_long }}' + #hvac_mode: 'heat' + temperature: "{{ states(display_target_temperature) | round(1) }}" - choose: ## PAGE HOME ## - conditions: '{{ trigger.event.data.new_state.state == page_home }}' @@ -4283,9 +4265,8 @@ action: ##### NSPanel Outdoor Temp ##### - variables: outdoor_temp: >- - {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(1) }} - {%- elif state_attr(weather_entity, "temperature") != None -%} {{state_attr(weather_entity,"temperature") | round(1)}} - {%- else -%} 0 + {%- if outdoortemp and is_number(states(outdoortemp)) -%}{{ states(outdoortemp) | round(1) }} + {%- else -%} {{state_attr(weather.entity,"temperature") | round(1) if state_attr(weather.entity, "temperature") else 0 }} {%- endif -%} ### LABEL Outdoor Temp Font Color ### - delay: @@ -4300,14 +4281,9 @@ action: - service: "{{ command_text_printf }}" data: component: home.outdoor_temp - message: "{{ outdoor_temp }}°" + message: '{{ outdoor_temp }}{{ weather.units.temperature }}' ##### NSPanel Indoor Temp ##### - - variables: - indoor_temp: >- - {%- if indoortemp is match "sensor." and states(indoortemp).state != "unavailable" -%} {{ states(indoortemp) |round(1) }} - {%- else -%} {{ states(nspaneltemp) |round(1) }} - {%- endif -%} ### ICON Indoor Temp Font Color ### - delay: milliseconds: "{{ delay_value }}" @@ -4335,36 +4311,14 @@ action: - service: "{{ command_text_printf }}" data: component: home.current_temp - message: "{{ indoor_temp }}°" + message: "{{ states(indoortemp) | round(1) if is_number(states(indoortemp)) else states(nspaneltemp) | round(1) }}{{ weather.units.temperature }}" ##### Weather Icon Home Page ##### - - variables: - weather_pic: >- - {%- if states(weather_entity) == 'sunny' -%} {{ weather_sunny }} - {%- elif states(weather_entity) == 'cloudy' -%} {{ weather_cloudy }} - {%- elif states(weather_entity) == 'rainy' -%} {{ weather_rainy }} - {%- elif states(weather_entity) == 'pouring' -%} {{ weather_pouring }} - {%- elif states(weather_entity) == 'snowy' -%} {{ weather_snowy }} - {%- elif states(weather_entity) == 'hail' -%} {{ weather_hail }} - {%- elif states(weather_entity) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif states(weather_entity) == 'fog' -%} {{ weather_fog }} - {%- elif states(weather_entity) == 'windy' -%} {{ weather_windy }} - {%- elif states(weather_entity) == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif states(weather_entity) == 'lightning' -%} {{ weather_lightning }} - {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} - {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} - {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} - {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} - {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} - {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} - {%- elif states(weather_entity) == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_printf }}" data: - cmd: home.weather.pic={{ weather_pic }} + cmd: home.weather.pic={{ nextion.pics.weather[states(weather_entity) | default('unknown')] }} ##### NSPanel Left Button Name ##### - if: @@ -4871,7 +4825,7 @@ action: {%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} 0 {%- elif repeat.item.entity is match "light." and current_entity_state == '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 current_entity_state == 'open' and state_attr(repeat.item.entity, "current_position") != None -%} {{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}% - {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}° + {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}{{ weather.units.temperature }} {%- else -%} 0 {%- endif -%} @@ -5122,7 +5076,7 @@ action: {%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} 0 {%- elif repeat.item.entity is match "light." and current_entity_state == '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 current_entity_state == 'open' and state_attr(repeat.item.entity, "current_position") != None -%} {{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}% - {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}° + {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}{{ weather.units.temperature }} {%- else -%} 0 {%- endif -%} @@ -5373,7 +5327,7 @@ action: {%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} 0 {%- elif repeat.item.entity is match "light." and current_entity_state == '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 current_entity_state == 'open' and state_attr(repeat.item.entity, "current_position") != None -%} {{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}% - {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}° + {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}{{ weather.units.temperature }} {%- else -%} 0 {%- endif -%} @@ -5624,7 +5578,7 @@ action: {%- if current_entity_state == 'unknown' or current_entity_state == 'unavailable' -%} 0 {%- elif repeat.item.entity is match "light." and current_entity_state == '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 current_entity_state == 'open' and state_attr(repeat.item.entity, "current_position") != None -%} {{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}% - {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}° + {%- elif repeat.item.entity is match "climate." and current_entity_state != 'off' and state_attr(repeat.item.entity, "current_temperature") != None -%} {{ (state_attr(repeat.item.entity, "current_temperature") | int) | round(0) }}{{ weather.units.temperature }} {%- else -%} 0 {%- endif -%} @@ -6229,17 +6183,20 @@ action: {%- endif -%} ## PAGE CLIMATE ## - - conditions: '{{ trigger.event.data.new_state.state == page_climate }}' - alias: 'climate page' + - alias: 'climate page' + conditions: '{{ trigger.event.data.new_state.state == page_climate }}' sequence: - variables: hvac_mode: "{{ states(entity_long) }}" outdoor_temp: >- - {%- if outdoortemp is match "sensor." and states(outdoortemp).state != "unavailable" -%} {{ states(outdoortemp) |round(0) }} - {%- elif state_attr(weather_entity, "temperature") != None -%} {{state_attr(weather_entity,"temperature") | round(0)}} - {%- else -%} 0 + {%- if outdoortemp is match "sensor." + and states(outdoortemp) != "unavailable" + and states(outdoortemp).state is defined + and is_number(states(outdoortemp).state) -%} + {{ states(outdoortemp) | round(1) }} + {%- else -%} {{state_attr(weather.entity,"temperature") | round(1) if is_number(state_attr(weather.entity, "temperature")) else 0 }} {%- endif -%} - heating_state: "{{ mui[language].climate.states.off if hvac_mode == 'off' else mui[language].climate.states.on }}" + heating_state: "{{ mui[language].climate.states.off if hvac_mode == 'off' else mui[language].climate.states.on }}" - service: "{{ command_text_printf }}" data: component: climate.climate_label @@ -6249,20 +6206,20 @@ action: - service: "{{ command_text_printf }}" data: component: outdoor_temp - message: "{{ outdoor_temp }}°" + message: "{{ outdoor_temp ~ weather.units.temperature }}" - service: "{{ command_text_printf }}" data: component: current_temp - message: "{{state_attr(entity_long, 'current_temperature') | round(1)}}°" + message: "{{ (state_attr(entity_long, 'current_temperature') | round(1) ~ weather.units.temperature) if is_number(state_attr(entity_long, 'current_temperature')) }}" - if: condition: template - value_template: '{{ hvac_mode != "off" }}' + value_template: '{{ hvac_mode != "off" and is_number(state_attr(entity_long, "temperature")) }}' then: - variables: target_temp: "{{state_attr(entity_long, 'temperature') | round(1)}}" - service: "{{ command_thermostat_cycle }}" data: - value: "{{target_temp}}" + value: "{{ target_temp }}" else: - service: "{{ command_thermostat_cycle }}" data: @@ -6271,11 +6228,10 @@ action: data: component: target_temp message: " " - - service: "{{ command_text_printf }}" data: component: heating_state - message: "{{heating_state}}" + message: "{{ heating_state }}" # HVAC Button PIC - variables: @@ -6305,1248 +6261,143 @@ action: - service: "{{ command_text_printf }}" data: component: climate.hotwater_temp - message: "{{ states(hotwatertemp) |round(1) }}°" + message: "{{ (states(hotwatertemp) | round(1) ~ weather.units.temperature) if is_number(states(hotwatertemp)) }}" - ## PAGE WEATHE01 ## - - conditions: '{{ trigger.event.data.new_state.state == page_weather01 }}' - alias: 'weather01 page' + ## PAGE WEATHER (WEATHE01 to WEATHE05) ## + - alias: 'weather pages' + conditions: '{{ trigger.event.data.new_state.state in [page_weather01, page_weather02, page_weather03, page_weather04, page_weather05] }}' sequence: - - choose: - ### DEFAULT - WEATHER ### - - conditions: '{{ weather == "Default" }}' + - variables: + page_name: "{{ trigger.event.data.new_state.state }}" + page_index: "{{ (page_name[-2:] | int(0)) - 1 }}" + accuweather_day_name: "{{ 'day_' ~ page_index }}" + accuweather_sensor_prefix: "{{ 'sensor.' ~ weather.name ~ '_' }}" + accuweather_sensor_sufix: "{{ '_' ~ page_index ~ 'd' }}" + temp_min: > + {% if weather.type == 'AccuWeather' %} + {{ states(accuweather_sensor_prefix ~ 'realfeel_temperature_min' ~ accuweather_sensor_sufix) | default('unknown') }} + {% else %} + {{ state_attr(weather.entity,'forecast')[page_index].templow | default('unknown') }} + {% endif %} + temp_max: > + {% if weather.type == 'AccuWeather' %} + {{ states(accuweather_sensor_prefix ~ 'realfeel_temperature_max' ~ accuweather_sensor_sufix) | default('unknown') }} + {% else %} + {{ state_attr(weather.entity,'forecast')[page_index].temperature | default('unknown') }} + {% endif %} + precipitation: "{{ state_attr(weather.entity,'forecast')[page_index].precipitation | default('unknown') }}" + precipitation_probability: "{{ state_attr(weather.entity,'forecast')[page_index].precipitation_probability | default('unknown') }}" + hours_of_sun: > + {% if weather.type == 'AccuWeather' %} + {{ states(accuweather_sensor_prefix ~ 'hours_of_sun' ~ accuweather_sensor_sufix) | default('unknown') }} + {% else %} + {{ state_attr(weather.entity,'forecast')[page_index].hours_of_sun | default('unknown') }} + {% endif %} + uv_index: > + {% if weather.type == 'AccuWeather' %} + {{ states(accuweather_sensor_prefix ~ 'uv_index' ~ accuweather_sensor_sufix) | default('unknown') }} + {% else %} + {{ state_attr(weather.entity,'forecast')[page_index].uv_index | default('unknown') }} + {% endif %} + wind_speed: "{{ state_attr(weather.entity,'forecast')[page_index].wind_speed | default('unknown') }}" + thunderstorm_probability: > + {% if weather.type == 'AccuWeather' %} + {{ states(accuweather_sensor_prefix ~ 'thunderstorm_probability_day' ~ accuweather_sensor_sufix) | default('unknown') }} + {% else %} + {{ state_attr(weather.entity,'forecast')[page_index].thunderstorm_probability | default('unknown') }} + {% endif %} + parameters: + - name: precipitation_probability + visibility: "{{ is_number(precipitation_probability) }}" + value: "{{ (precipitation_probability | round(0) ~ weather.units.precipitation_probability) if is_number(precipitation_probability) }}" + icon: "{{ nextion.icons.weather.rain }}" + - name: precipitation + visibility: "{{ is_number(precipitation) }}" + value: "{{ (precipitation | round(0) ~ ' ' ~ weather.units.precipitation) if is_number(precipitation) }}" + icon: "{{ nextion.icons.weather.rain }}" + - name: hours_of_sun + visibility: "{{ is_number(hours_of_sun) }}" + value: "{{ (hours_of_sun | round(0) ~ ' ' ~ weather.units.hours_of_sun) if is_number(hours_of_sun) }}" + icon: "{{ nextion.icons.weather.sun }}" + - name: uv_index + visibility: "{{ is_number(uv_index) }}" + value: > + {{ (state_attr(accuweather_sensor_prefix ~ 'uv_index' ~ accuweather_sensor_sufix, 'level') | default(None) ~ ': ') if weather.type == 'AccuWeather' }} + {{ (uv_index | round(0) ~ weather.units.uv_index) if is_number(uv_index) }} + icon: "{{ nextion.icons.weather.protect }}" + - name: wind_speed + visibility: "{{ is_number(wind_speed) }}" + value: "{{ (wind_speed | round(0) ~ ' ' ~ weather.units.wind_speed) if is_number(wind_speed) }}" + icon: "{{ nextion.icons.weather.wind }}" + - name: thunderstorm_probability + visibility: "{{ is_number(thunderstorm_probability) }}" + value: "{{ (thunderstorm_probability | round(0) ~ weather.units.thunderstorm_probability) if is_number(thunderstorm_probability) }}" + icon: "{{ nextion.icons.weather.lightning }}" + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: "{{ page_name }}.weather_icon.pic={{ nextion.pics.weather[states(weather_entity) | default('unknown')] if page_name == page_weather01 else nextion.pics.weather[state_attr(weather_entity,'forecast')[page_index].condition | default('unknown')] }}" + - delay: + milliseconds: "{{ delay_value }}" + + - if: "{{ is_number(temp_min) }}" + then: + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: "{{ page_name }}.temp_min" ### Temperature MIN ### + message: '{{temp_min | round(0)}}{{ weather.units.temperature }}' + - delay: + milliseconds: "{{ delay_value }}" + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: "{{ page_name }}.slash" + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: "{{ page_name }}.temp_max" ### Temperature MAX ### + message: '{{temp_max | round(0)}}{{ weather.units.temperature }}' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: "{{ page_name }}.day" + message: "{{ (dict.values(mui[language].relative_day) | list)[page_index] }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: "{{ page_name }}.date" + message: "{{ (dict.values(mui[language].weekdays) | list)[(now() + timedelta(days= (page_index))).weekday()] ~ ', ' ~ as_timestamp(now() + timedelta(days= (page_index))) | timestamp_custom(date_format) }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### fields 1 to 5 (Parameters) ##### + - repeat: + for_each: "{{ (parameters | selectattr('visibility', 'eq', true) | list)[:5] }}" sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if states(weather_entity) == 'sunny' -%} {{ weather_sunny }} - {%- elif states(weather_entity) == 'cloudy' -%} {{ weather_cloudy }} - {%- elif states(weather_entity) == 'rainy' -%} {{ weather_rainy }} - {%- elif states(weather_entity) == 'pouring' -%} {{ weather_pouring }} - {%- elif states(weather_entity) == 'snowy' -%} {{ weather_snowy }} - {%- elif states(weather_entity) == 'hail' -%} {{ weather_hail }} - {%- elif states(weather_entity) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif states(weather_entity) == 'fog' -%} {{ weather_fog }} - {%- elif states(weather_entity) == 'windy' -%} {{ weather_windy }} - {%- elif states(weather_entity) == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif states(weather_entity) == 'lightning' -%} {{ weather_lightning }} - {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} - {%- elif states(weather_entity) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} - {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} - {%- elif states(weather_entity) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} - {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} - {%- elif states(weather_entity) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} - {%- elif states(weather_entity) == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - service: "{{ command_printf }}" - data: - cmd: weather01.weather_icon.pic={{ weather_icon }} - - delay: - milliseconds: "{{ delay_value }}" - - ##### SET TEMP MAX #### - - service: "{{ command_text_printf }}" - data: - component: weather01.temp_max ### Temperature MAX ### - message: '{{state_attr(weather_entity,"temperature") | round(0)}}°' - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.day - message: "{{ mui[language].today }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.date - message: "{{ mui_weekday_today }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - ##### field 2 ##### - - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.value03 - message: '{{state_attr(weather_entity,"wind_speed") | round(0)}} km/h' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather01.value03_icon - message: "{{ weather_icon_wind }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 4 ##### - - ##### field 5 ##### - - ### ACCUWEATHER - WEATHER ### - - conditions: '{{ weather == "AccuWeather" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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 }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.day - message: "{{ mui[language].today }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.date - message: "{{ mui_weekday_today }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather01.value01 - message: "{{ state_attr(weather_entity,'forecast')[0].precipitation_probability}} %" - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather01.value01_icon - message: "{{ 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_text_printf }}" - data: - component: weather01.value02_icon - message: "{{ 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_text_printf }}" - data: - component: weather01.value03_icon - message: "{{ 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_text_printf }}" - data: - component: weather01.value04_icon - message: "{{ 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_text_printf }}" - data: - component: weather01.value05_icon - message: "{{ weather_icon_wind }}" - - ### DEFAULT ### - default: - - service: "{{ command_printf }}" + - service: "{{ command_text_printf }}" data: - cmd: "page {{ page_home }}" - - ## PAGE WEATHE02 ## - - conditions: '{{ trigger.event.data.new_state.state == page_weather02 }}' - alias: 'weather02 page' - sequence: - - choose: - ### DEFAULT - WEATHER ### - - conditions: '{{ weather == "Default" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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: '{{state_attr(weather_entity,"forecast")[0].templow | 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: '{{state_attr(weather_entity,"forecast")[0].temperature | round(0)}}°' - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.day - message: "{{ mui[language].tomorrow }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.date - message: "{{ mui_weekday_tomorrow }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.value02 - message: '{{state_attr(weather_entity,"forecast")[0].precipitation| round(1)}} mm' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather02.value02_icon - message: "{{ weather_icon_rain }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.value03 - message: '{{state_attr(weather_entity,"forecast")[0].wind_speed | round(1)}} km/h' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather02.value03_icon - message: "{{ weather_icon_wind }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 4 ##### - - ##### field 5 ##### - - ### ACCUWEATHER - WEATHER ### - - conditions: '{{ weather == "AccuWeather" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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 }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.day - message: "{{ mui[language].tomorrow }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.date - message: "{{ mui_weekday_tomorrow }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather02.value01 - message: "{{ state_attr(weather_entity,'forecast')[1].precipitation_probability}} %" - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather02.value01_icon - message: "{{ 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_text_printf }}" - data: - component: weather02.value02_icon - message: "{{ 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_text_printf }}" - data: - component: weather02.value03_icon - message: "{{ 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_text_printf }}" - data: - component: weather02.value04_icon - message: "{{ 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_text_printf }}" - data: - component: weather02.value05_icon - message: "{{ weather_icon_wind }}" - - ### DEFAULT #### - default: - - service: "{{ command_printf }}" + component: "{{ page_name }}.value0{{ repeat.index }}" + message: "{{ repeat.item.value }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" data: - cmd: "page {{ page_home }}" - - ## PAGE WEATHE03 ## - - conditions: '{{ trigger.event.data.new_state.state == page_weather03 }}' - alias: 'weather03 page' - sequence: - - choose: - ### DEFAULT - WEATHER ### - - conditions: '{{ weather == "Default" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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: '{{state_attr(weather_entity,"forecast")[1].templow | 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: '{{state_attr(weather_entity,"forecast")[1].temperature | round(0)}}°' - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.day - message: "{{ mui[language].in_2_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.date - message: "{{ mui_weekday_in_2_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.value02 - message: '{{state_attr(weather_entity,"forecast")[1].precipitation| round(1)}} mm' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather03.value02_icon - message: "{{ weather_icon_rain }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.value03 - message: '{{state_attr(weather_entity,"forecast")[1].wind_speed | round(1)}} km/h' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather03.value03_icon - message: "{{ weather_icon_wind }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 4 ##### - - ##### field 5 ##### - - ### ACCUWEATHER - WEATHER ### - - conditions: '{{ weather == "AccuWeather" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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 }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.day - message: "{{ mui[language].in_2_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.date - message: "{{ mui_weekday_in_2_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather03.value01 - message: "{{ state_attr(weather_entity,'forecast')[2].precipitation_probability}} %" - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather03.value01_icon - message: "{{ 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_text_printf }}" - data: - component: weather03.value02_icon - message: "{{ 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_text_printf }}" - data: - component: weather03.value03_icon - message: "{{ 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_text_printf }}" - data: - component: weather03.value04_icon - message: "{{ 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_text_printf }}" - data: - component: weather03.value05_icon - message: "{{ weather_icon_wind }}" - - ### DEFAULT ### - default: - - service: "{{ command_printf }}" - data: - cmd: "page {{ page_home }}" - - ## PAGE WEATHE04 ## - - conditions: '{{ trigger.event.data.new_state.state == page_weather04 }}' - alias: 'weather04 page' - sequence: - - choose: - ### DEFAULT - WEATHER ### - - conditions: '{{ weather == "Default" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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(weather_entity,"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(weather_entity,"forecast")[2].temperature | round(0)}}°' - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.day - message: "{{ mui[language].in_3_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.date - message: "{{ mui_weekday_in_3_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.value02 - message: '{{state_attr(weather_entity,"forecast")[2].precipitation| round(1)}} mm' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather04.value02_icon - message: "{{ weather_icon_rain }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.value03 - message: '{{state_attr(weather_entity,"forecast")[2].wind_speed | round(1)}} km/h' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather04.value03_icon - message: "{{ weather_icon_wind }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 4 ##### - - ##### field 5 ##### - - ### ACCUWEATHER - WEATHER ### - - conditions: '{{ weather == "AccuWeather" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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 }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.day - message: "{{ mui[language].in_3_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.date - message: "{{ mui_weekday_in_3_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather04.value01 - message: "{{ state_attr(weather_entity,'forecast')[3].precipitation_probability}} %" - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather04.value01_icon - message: "{{ 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_text_printf }}" - data: - component: weather04.value02_icon - message: "{{ 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_text_printf }}" - data: - component: weather04.value03_icon - message: "{{ 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_text_printf }}" - data: - component: weather04.value04_icon - message: "{{ 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_text_printf }}" - data: - component: weather04.value05_icon - message: "{{ weather_icon_wind }}" - - ### DEFAULT ### - default: - - service: "{{ command_printf }}" - data: - cmd: "page {{ page_home }}" - - ## PAGE WEATHE05 ## - - conditions: '{{ trigger.event.data.new_state.state == page_weather05 }}' - alias: 'weather05 page' - sequence: - - choose: - ### DEAFAULT - WEATHER ### - - conditions: '{{ weather == "Default" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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(weather_entity,"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(weather_entity,"forecast")[3].temperature | round(0)}}°' - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.day - message: "{{ mui[language].in_4_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.date - message: "{{ mui_weekday_in_4_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - ##### field 2 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.value02 - message: '{{state_attr(weather_entity,"forecast")[3].precipitation| round(1)}} mm' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather05.value02_icon - message: "{{ weather_icon_rain }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 3 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.value03 - message: '{{state_attr(weather_entity,"forecast")[3].wind_speed | round(1)}} km/h' - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather05.value03_icon - message: "{{ weather_icon_wind }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 4 ##### - - ##### field 5 ##### - - ### ACCUWEATHER - WEATHER ### - - conditions: '{{ weather == "AccuWeather" }}' - sequence: - - variables: - # weather PIC - weather_icon: >- - {%- if state_attr(weather_entity,"forecast")[4].condition == 'sunny' -%} {{ weather_sunny }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'cloudy' -%} {{ weather_cloudy }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'rainy' -%} {{ weather_rainy }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'pouring' -%} {{ weather_pouring }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'snowy' -%} {{ weather_snowy }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'hail' -%} {{ weather_hail }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'fog' -%} {{ weather_fog }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'windy' -%} {{ weather_windy }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'lightning' -%} {{ weather_lightning }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'execptional' -%} {{ weather_execptional_day }} - {%- elif state_attr(weather_entity,"forecast")[4].condition == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - - ##### SET weather PIC on Home Page #### - - 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 }}" - - ##### Day Name ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.day - message: "{{ mui[language].in_4_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### Day Date ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.date - message: "{{ mui_weekday_in_4_days }}" - - delay: - milliseconds: "{{ delay_value }}" - - ##### field 1 ##### - - service: "{{ command_text_printf }}" - data: - component: weather05.value01 - message: "{{ state_attr(weather_entity,'forecast')[4].precipitation_probability}} %" - - delay: - milliseconds: "{{ delay_value }}" - - service: "{{ command_text_printf }}" - data: - component: weather05.value01_icon - message: "{{ 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_text_printf }}" - data: - component: weather05.value02_icon - message: "{{ 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_text_printf }}" - data: - component: weather05.value03_icon - message: "{{ 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_text_printf }}" - data: - component: weather05.value04_icon - message: "{{ 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_text_printf }}" - data: - component: weather05.value05_icon - message: "{{ weather_icon_wind }}" - - ### DEFAULT ### - default: - - service: "{{ command_printf }}" - data: - cmd: "page {{ page_home }}" + component: "{{ page_name }}.value0{{ repeat.index }}_icon" + message: "{{ repeat.item.icon }}" + - delay: + milliseconds: "{{ delay_value }}" ## PAGE NOTIFICATION ## - conditions: '{{ trigger.event.data.new_state.state == page_notification }}' @@ -7807,7 +6658,7 @@ action: 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) }}% - {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state != 'off' and trigger.to_state.attributes.current_temperature is defined -%} {{ (trigger.to_state.attributes.current_temperature | int) | round(0) }}° + {%- elif trigger.to_state.entity_id is match "climate." and trigger.to_state.state != 'off' and trigger.to_state.attributes.current_temperature is defined -%} {{ (trigger.to_state.attributes.current_temperature | int) | round(0) }}{{ weather.units.temperature }} {%- else -%} 0 {%- endif -%} ##### SET Button PIC @@ -8722,7 +7573,7 @@ action: value_template: '{{ climate_optimistic == true }}' ## TODO - remove from here then: - variables: - current_setpoint: "{{states(display_target_temperature) | round(1)}}" + current_setpoint: "{{ states(display_target_temperature) | round(1) if is_number(states(display_target_temperature)) else states(display_target_temperature) }}" - service: "{{ command_thermostat_cycle }}" data: value: "{{ current_setpoint -0.5 }}" @@ -8750,7 +7601,7 @@ action: value_template: '{{ climate_optimistic == true }}' ## TODO - remove from here then: - variables: - current_setpoint: "{{states(display_target_temperature) | round(1)}}" + current_setpoint: "{{ states(display_target_temperature) | round(1) if is_number(states(display_target_temperature)) else states(display_target_temperature) }}" - service: "{{ command_thermostat_cycle }}" data: value: "{{ current_setpoint +0.5 }}" @@ -9542,7 +8393,7 @@ action: - condition: trigger id: outdoortemp_state - condition: template - value_template: "{{ states(current_page) == page_home and trigger.event.data.new_state.state != 'unavailable' }}" + value_template: "{{ states(current_page) == page_home and is_number(trigger.event.data.new_state.state) }}" sequence: ### LABEL Outdoor Temp Font Color ### - delay: @@ -9557,7 +8408,7 @@ action: - service: "{{ command_text_printf }}" data: component: home.outdoor_temp - message: "{{ trigger.event.data.new_state.state |round(1) }}°" + message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather.units.temperature }}" ##### INDOOR TEMP - entity ##### - conditions: @@ -9579,14 +8430,14 @@ action: - service: "{{ command_text_printf }}" data: component: home.current_temp - message: "{{ trigger.event.data.new_state.state |round(1) }}°" + message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather.units.temperature }}" ##### INDOOR TEMP - nspanel ##### - conditions: - condition: trigger id: nspaneltemp_state - condition: template - value_template: "{{ states(current_page) == page_home and trigger.event.data.new_state.state != 'unavailable' }}" + value_template: "{{ states(current_page) == page_home and is_number(trigger.event.data.new_state.state) }}" sequence: - if: - condition: template @@ -9605,7 +8456,7 @@ action: - service: "{{ command_text_printf }}" data: component: home.current_temp - message: "{{ trigger.event.data.new_state.state |round(1) }}°" + message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather.units.temperature }}" ##### WEATHER STATE - change update ##### - conditions: @@ -9631,36 +8482,15 @@ action: - service: "{{ command_text_printf }}" data: component: home.outdoor_temp - message: '{{trigger.event.data.new_state.attributes.temperature | round(0)}}°' + message: '{{trigger.event.data.new_state.attributes.temperature | round(1)}}{{ weather.units.temperature }}' - service: "{{ command_text_printf }}" data: component: climate.outdoor_temp - message: '{{trigger.event.data.new_state.attributes.temperature | round(0)}}°' + message: '{{trigger.event.data.new_state.attributes.temperature | round(1)}}{{ weather.units.temperature }}' - - variables: - weather_pic: >- - {%- if trigger.event.data.new_state.state == 'sunny' -%} {{ weather_sunny }} - {%- elif trigger.event.data.new_state.state == 'cloudy' -%} {{ weather_cloudy }} - {%- elif trigger.event.data.new_state.state == 'rainy' -%} {{ weather_rainy }} - {%- elif trigger.event.data.new_state.state == 'pouring' -%} {{ weather_pouring }} - {%- elif trigger.event.data.new_state.state == 'snowy' -%} {{ weather_snowy }} - {%- elif trigger.event.data.new_state.state == 'hail' -%} {{ weather_hail }} - {%- elif trigger.event.data.new_state.state == 'snowy-rainy' -%} {{ weather_snowy_rainy }} - {%- elif trigger.event.data.new_state.state == 'fog' -%} {{ weather_fog }} - {%- elif trigger.event.data.new_state.state == 'windy' -%} {{ weather_windy }} - {%- elif trigger.event.data.new_state.state == 'windy-variant' -%} {{ weather_windy-variant }} - {%- elif trigger.event.data.new_state.state == 'lightning' -%} {{ weather_lightning }} - {%- elif trigger.event.data.new_state.state == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} - {%- elif trigger.event.data.new_state.state == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} - {%- elif trigger.event.data.new_state.state == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} - {%- elif trigger.event.data.new_state.state == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} - {%- elif trigger.event.data.new_state.state == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} - {%- elif trigger.event.data.new_state.state == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} - {%- elif trigger.event.data.new_state.state == 'clear-night' -%} {{ weather_clear_night }} - {%- endif -%} - service: "{{ command_printf }}" data: - cmd: home.weather.pic={{ weather_pic }} + cmd: home.weather.pic={{ nextion.pics.weather[trigger.event.data.new_state.state | default('unknown')] }} @@ -9688,7 +8518,7 @@ action: - service: "{{ command_text_printf }}" data: component: current_temp - message: "{{ trigger.event.data.new_state.attributes.current_temperature | round(1)}}°" + message: "{{ trigger.event.data.new_state.attributes.current_temperature | round(1)}}{{ weather.units.temperature }}" - service: "{{ command_text_printf }}" data: component: heating_state @@ -9739,13 +8569,13 @@ action: - service: "{{ command_text_printf }}" data: component: home.hotwater_temp - message: "{{ trigger.event.data.new_state.state |round(1) }}°" + message: "{{ trigger.event.data.new_state.state |round(1) }}{{ weather.units.temperature }}" - delay: milliseconds: "{{ delay_value }}" - service: "{{ command_text_printf }}" data: component: climate.hotwater_temp - message: "{{ trigger.event.data.new_state.state |round(1) }}°" + message: "{{ trigger.event.data.new_state.state |round(1) }}{{ weather.units.temperature }}" # - delay: # milliseconds: "{{ delay_value }}" # - service: "{{ command_printf }}"