diff --git a/blueprint.yaml b/blueprint.yaml index 983e035..1fe52a2 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -47,6 +47,31 @@ blueprint: default: /config/www/nspanel/buero/nspanel_buero.tft selector: text: {} + humidity: + name: Humidity Sensor (Optional) + description: select the humidity Sensor. This value is displayed on the Home Page + default: [] + selector: + entity: + domain: + - sensor + hotwatertemp: + name: Hot Water Temperature Sensor (Optional) + description: select the hot water Sensor. This value is displayed on the Home Page an Thermostat Page + default: [] + selector: + entity: + domain: + - sensor + outdoortemp: + name: Outdoor Temperature Sensor (Optional) + description: select the Temperature Sensor. This value is displayed on the Home Page an Thermostat Page + default: [] + selector: + entity: + domain: + - sensor +##### Button ##### entity01: name: Button 01 (Optional) description: Nextion Editor - *buttonpage01.button01* **(ONLY light | switch | cover | input_boolean)** @@ -489,7 +514,7 @@ blueprint: - input_boolean mode: parallel -max: 500 +max: 5000 ######################################### # @@ -521,6 +546,9 @@ variables: command_printf: !input 'command_printf' tft_path: !input 'tft_path' nextion_inited: !input 'nextion_inited' + humidity: !input 'humidity' + hotwatertemp: !input 'hotwatertemp' + outdoortemp: !input 'outdoortemp' ##### Weather ##### date0: "{{ ((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,') }}" @@ -639,13 +667,41 @@ trigger: minutes: '10' id: weather_time -#### Weather - Trigger #### +#### NSPanel boot - Trigger #### - platform: state entity_id: !input 'nextion_inited' to: 'on' for: seconds: 5 - id: weather_boot + id: nspanel_boot + +##### Humidity - Trigger ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input 'humidity' + id: humidity_state + +##### Hot Water - Trigger ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input 'hotwatertemp' + id: hotwatertemp_state + +##### Outdoor Temp - Trigger ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input 'outdoortemp' + id: outdoortemp_state + +##### Date - Trigger ##### + - platform: event + event_type: state_changed + event_data: + entity_id: 'date0' + id: date0_state ##### Button01 Sync - Trigger ##### - platform: state @@ -1304,6 +1360,66 @@ action: - service: esphome.nspanel_buero_upload_tft data: {} +##### Humidity ##### + - choose: + - conditions: + - condition: trigger + id: + - humidity_state + - nspanel_boot + sequence: + - service: !input command_text_printf + data: + component: home.a04 + message: '{{ states(humidity) |round(0) }}%' + +##### Hotwater Temp ##### + - choose: + - conditions: + - condition: trigger + id: + - hotwatertemp_state + - nspanel_boot + sequence: + - service: !input command_text_printf + data: + component: home.a07 + message: '{{ states(hotwatertemp) |round(1) }}°' + - service: !input command_text_printf + data: + component: thermostat.a08 + message: '{{ states(hotwatertemp) |round(1) }}°' + +##### Outdoor Temp ##### + - choose: + - conditions: + - condition: trigger + id: + - outdoortemp_state + - nspanel_boot + sequence: + - service: !input command_text_printf + data: + component: home.a06 + message: '{{ states(outdoortemp) |round(0) }}°' + - service: !input command_text_printf + data: + component: thermostat.a07 + message: '{{ states(outdoortemp) |round(0) }}°' + +##### Date Home Page ##### + - choose: + - conditions: + - condition: trigger + id: + - date0_state + - nspanel_boot + sequence: + - service: !input command_text_printf + data: + component: home.a02 + message: '{{ date0 }}' + ######################################### # # @@ -1331,6 +1447,7 @@ action: id: - current_state_entity01 - button_page + - nspanel_boot - condition: state entity_id: !input entity01 state: @@ -1346,7 +1463,7 @@ action: id: - current_state_entity01 - button_page -# - "{{ is_state('entity01', 'off' or 'closed') }}" + - nspanel_boot - condition: state entity_id: !input entity01 state: @@ -1365,6 +1482,7 @@ action: id: - current_state_entity02 - button_page + - nspanel_boot - condition: state entity_id: !input entity02 state: @@ -1380,6 +1498,7 @@ action: id: - current_state_entity02 - button_page + - nspanel_boot - condition: state entity_id: !input entity02 state: @@ -1398,6 +1517,7 @@ action: id: - current_state_entity03 - button_page + - nspanel_boot - condition: state entity_id: !input entity03 state: @@ -1413,6 +1533,7 @@ action: id: - current_state_entity03 - button_page + - nspanel_boot - condition: state entity_id: !input entity03 state: @@ -1431,6 +1552,7 @@ action: id: - current_state_entity04 - button_page + - nspanel_boot - condition: state entity_id: !input entity04 state: @@ -1446,6 +1568,7 @@ action: id: - current_state_entity04 - button_page + - nspanel_boot - condition: state entity_id: !input entity04 state: @@ -1464,6 +1587,7 @@ action: id: - current_state_entity05 - button_page + - nspanel_boot - condition: state entity_id: !input entity05 state: @@ -1479,6 +1603,7 @@ action: id: - current_state_entity05 - button_page + - nspanel_boot - condition: state entity_id: !input entity05 state: @@ -1497,6 +1622,7 @@ action: id: - current_state_entity06 - button_page + - nspanel_boot - condition: state entity_id: !input entity06 state: @@ -1512,6 +1638,7 @@ action: id: - current_state_entity06 - button_page + - nspanel_boot - condition: state entity_id: !input entity06 state: @@ -1530,6 +1657,7 @@ action: id: - current_state_entity07 - button_page + - nspanel_boot - condition: state entity_id: !input entity07 state: @@ -1545,6 +1673,7 @@ action: id: - current_state_entity07 - button_page + - nspanel_boot - condition: state entity_id: !input entity07 state: @@ -1563,6 +1692,7 @@ action: id: - current_state_entity08 - button_page + - nspanel_boot - condition: state entity_id: !input entity08 state: @@ -1578,6 +1708,7 @@ action: id: - current_state_entity08 - button_page + - nspanel_boot - condition: state entity_id: !input entity08 state: @@ -1596,6 +1727,7 @@ action: id: - current_state_entity09 - button_page + - nspanel_boot - condition: state entity_id: !input entity09 state: @@ -1611,6 +1743,7 @@ action: id: - current_state_entity09 - button_page + - nspanel_boot - condition: state entity_id: !input entity09 state: @@ -1629,6 +1762,7 @@ action: id: - current_state_entity10 - button_page + - nspanel_boot - condition: state entity_id: !input entity10 state: @@ -1644,6 +1778,7 @@ action: id: - current_state_entity10 - button_page + - nspanel_boot - condition: state entity_id: !input entity10 state: @@ -1662,6 +1797,7 @@ action: id: - current_state_entity11 - button_page + - nspanel_boot - condition: state entity_id: !input entity11 state: @@ -1677,6 +1813,7 @@ action: id: - current_state_entity11 - button_page + - nspanel_boot - condition: state entity_id: !input entity11 state: @@ -1695,6 +1832,7 @@ action: id: - current_state_entity12 - button_page + - nspanel_boot - condition: state entity_id: !input entity12 state: @@ -1710,6 +1848,7 @@ action: id: - current_state_entity12 - button_page + - nspanel_boot - condition: state entity_id: !input entity12 state: @@ -1728,6 +1867,7 @@ action: id: - current_state_entity13 - button_page + - nspanel_boot - condition: state entity_id: !input entity13 state: @@ -1743,6 +1883,7 @@ action: id: - current_state_entity13 - button_page + - nspanel_boot - condition: state entity_id: !input entity13 state: @@ -1761,6 +1902,7 @@ action: id: - current_state_entity14 - button_page + - nspanel_boot - condition: state entity_id: !input entity14 state: @@ -1776,6 +1918,7 @@ action: id: - current_state_entity14 - button_page + - nspanel_boot - condition: state entity_id: !input entity14 state: @@ -1794,6 +1937,7 @@ action: id: - current_state_entity15 - button_page + - nspanel_boot - condition: state entity_id: !input entity15 state: @@ -1809,6 +1953,7 @@ action: id: - current_state_entity15 - button_page + - nspanel_boot - condition: state entity_id: !input entity15 state: @@ -1827,6 +1972,7 @@ action: id: - current_state_entity16 - button_page + - nspanel_boot - condition: state entity_id: !input entity16 state: @@ -1842,6 +1988,7 @@ action: id: - current_state_entity16 - button_page + - nspanel_boot - condition: state entity_id: !input entity16 state: @@ -1860,6 +2007,7 @@ action: id: - current_state_entity17 - button_page + - nspanel_boot - condition: state entity_id: !input entity17 state: @@ -1875,6 +2023,7 @@ action: id: - current_state_entity17 - button_page + - nspanel_boot - condition: state entity_id: !input entity17 state: @@ -1893,6 +2042,7 @@ action: id: - current_state_entity18 - button_page + - nspanel_boot - condition: state entity_id: !input entity18 state: @@ -1908,6 +2058,7 @@ action: id: - current_state_entity18 - button_page + - nspanel_boot - condition: state entity_id: !input entity18 state: @@ -1926,6 +2077,7 @@ action: id: - current_state_entity19 - button_page + - nspanel_boot - condition: state entity_id: !input entity19 state: @@ -1941,6 +2093,7 @@ action: id: - current_state_entity19 - button_page + - nspanel_boot - condition: state entity_id: !input entity19 state: @@ -1959,6 +2112,7 @@ action: id: - current_state_entity20 - button_page + - nspanel_boot - condition: state entity_id: !input entity20 state: @@ -1974,6 +2128,7 @@ action: id: - current_state_entity20 - button_page + - nspanel_boot - condition: state entity_id: !input entity20 state: @@ -1992,6 +2147,7 @@ action: id: - current_state_entity21 - button_page + - nspanel_boot - condition: state entity_id: !input entity21 state: @@ -2007,6 +2163,7 @@ action: id: - current_state_entity21 - button_page + - nspanel_boot - condition: state entity_id: !input entity21 state: @@ -2025,6 +2182,7 @@ action: id: - current_state_entity22 - button_page + - nspanel_boot - condition: state entity_id: !input entity22 state: @@ -2040,6 +2198,7 @@ action: id: - current_state_entity22 - button_page + - nspanel_boot - condition: state entity_id: !input entity22 state: @@ -2058,6 +2217,7 @@ action: id: - current_state_entity23 - button_page + - nspanel_boot - condition: state entity_id: !input entity23 state: @@ -2073,6 +2233,7 @@ action: id: - current_state_entity23 - button_page + - nspanel_boot - condition: state entity_id: !input entity23 state: @@ -2091,6 +2252,7 @@ action: id: - current_state_entity24 - button_page + - nspanel_boot - condition: state entity_id: !input entity24 state: @@ -2106,6 +2268,7 @@ action: id: - current_state_entity24 - button_page + - nspanel_boot - condition: state entity_id: !input entity24 state: @@ -2124,6 +2287,7 @@ action: id: - current_state_entity25 - button_page + - nspanel_boot - condition: state entity_id: !input entity25 state: @@ -2139,6 +2303,7 @@ action: id: - current_state_entity25 - button_page + - nspanel_boot - condition: state entity_id: !input entity25 state: @@ -2157,6 +2322,7 @@ action: id: - current_state_entity26 - button_page + - nspanel_boot - condition: state entity_id: !input entity26 state: @@ -2172,6 +2338,7 @@ action: id: - current_state_entity26 - button_page + - nspanel_boot - condition: state entity_id: !input entity26 state: @@ -2190,6 +2357,7 @@ action: id: - current_state_entity27 - button_page + - nspanel_boot - condition: state entity_id: !input entity27 state: @@ -2205,6 +2373,7 @@ action: id: - current_state_entity27 - button_page + - nspanel_boot - condition: state entity_id: !input entity27 state: @@ -2223,6 +2392,7 @@ action: id: - current_state_entity28 - button_page + - nspanel_boot - condition: state entity_id: !input entity28 state: @@ -2238,6 +2408,7 @@ action: id: - current_state_entity28 - button_page + - nspanel_boot - condition: state entity_id: !input entity28 state: @@ -2256,6 +2427,7 @@ action: id: - current_state_entity29 - button_page + - nspanel_boot - condition: state entity_id: !input entity29 state: @@ -2271,6 +2443,7 @@ action: id: - current_state_entity29 - button_page + - nspanel_boot - condition: state entity_id: !input entity29 state: @@ -2289,6 +2462,7 @@ action: id: - current_state_entity30 - button_page + - nspanel_boot - condition: state entity_id: !input entity30 state: @@ -2304,6 +2478,7 @@ action: id: - current_state_entity30 - button_page + - nspanel_boot - condition: state entity_id: !input entity30 state: @@ -2322,6 +2497,7 @@ action: id: - current_state_entity31 - button_page + - nspanel_boot - condition: state entity_id: !input entity31 state: @@ -2337,6 +2513,7 @@ action: id: - current_state_entity31 - button_page + - nspanel_boot - condition: state entity_id: !input entity31 state: @@ -2355,6 +2532,7 @@ action: id: - current_state_entity32 - button_page + - nspanel_boot - condition: state entity_id: !input entity32 state: @@ -2370,6 +2548,7 @@ action: id: - current_state_entity32 - button_page + - nspanel_boot - condition: state entity_id: !input entity32 state: @@ -2388,6 +2567,7 @@ action: id: - current_state_entity33 - button_page + - nspanel_boot - condition: state entity_id: !input entity33 state: @@ -2403,6 +2583,7 @@ action: id: - current_state_entity33 - button_page + - nspanel_boot - condition: state entity_id: !input entity33 state: @@ -2421,6 +2602,7 @@ action: id: - current_state_entity34 - button_page + - nspanel_boot - condition: state entity_id: !input entity34 state: @@ -2436,6 +2618,7 @@ action: id: - current_state_entity34 - button_page + - nspanel_boot - condition: state entity_id: !input entity34 state: @@ -2454,6 +2637,7 @@ action: id: - current_state_entity35 - button_page + - nspanel_boot - condition: state entity_id: !input entity35 state: @@ -2469,6 +2653,7 @@ action: id: - current_state_entity35 - button_page + - nspanel_boot - condition: state entity_id: !input entity35 state: @@ -2487,6 +2672,7 @@ action: id: - current_state_entity36 - button_page + - nspanel_boot - condition: state entity_id: !input entity36 state: @@ -2502,6 +2688,7 @@ action: id: - current_state_entity36 - button_page + - nspanel_boot - condition: state entity_id: !input entity36 state: @@ -2520,6 +2707,7 @@ action: id: - current_state_entity37 - button_page + - nspanel_boot - condition: state entity_id: !input entity37 state: @@ -2535,6 +2723,7 @@ action: id: - current_state_entity37 - button_page + - nspanel_boot - condition: state entity_id: !input entity37 state: @@ -2553,6 +2742,7 @@ action: id: - current_state_entity38 - button_page + - nspanel_boot - condition: state entity_id: !input entity38 state: @@ -2568,6 +2758,7 @@ action: id: - current_state_entity38 - button_page + - nspanel_boot - condition: state entity_id: !input entity38 state: @@ -2586,6 +2777,7 @@ action: id: - current_state_entity39 - button_page + - nspanel_boot - condition: state entity_id: !input entity39 state: @@ -2601,6 +2793,7 @@ action: id: - current_state_entity39 - button_page + - nspanel_boot - condition: state entity_id: !input entity39 state: @@ -2619,6 +2812,7 @@ action: id: - current_state_entity40 - button_page + - nspanel_boot - condition: state entity_id: !input entity40 state: @@ -2634,6 +2828,7 @@ action: id: - current_state_entity40 - button_page + - nspanel_boot - condition: state entity_id: !input entity40 state: @@ -2664,7 +2859,853 @@ action: # # ######################################### - + - choose: + - conditions: + - condition: trigger + id: + - weather_time + - nspanel_boot +##### Forcast Day 0 ##### + sequence: + - service: !input command_text_printf + data: + component: weather01.a02 + message: '{{ date0 }}' + - service: !input command_text_printf + data: + component: weather01.a04 + message: '{{states("sensor.home_wetter_realfeel_temperature_min_0d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather01.a05 + message: '{{states("sensor.home_wetter_realfeel_temperature_max_0d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather01.a06 + message: '{{ state_attr("weather.home_wetter","forecast")[0].precipitation_probability}} + %' + - service: !input command_text_printf + data: + component: weather01.a07 + message: '{{states("sensor.home_wetter_hours_of_sun_0d") | round(0)}} h' + - service: !input command_text_printf + data: + component: weather01.a08 + message: '{{state_attr("sensor.home_wetter_uv_index_0d", "level")}}' + - service: !input command_text_printf + data: + component: weather01.a09 + message: '{{states("sensor.home_wetter_uv_index_0d") | round(0)}}' + - service: !input command_text_printf + data: + component: weather01.a10 + message: '{{states("sensor.home_wetter_thunderstorm_probability_day_0d") | round(0)}} + %' + - service: !input command_text_printf + data: + component: weather01.a11 + message: '{{states("sensor.home_wetter_wind_day_0d") | round(0)}} km/h' + - service: !input command_text_printf + data: + component: weather01.a12 + message: '{{states("sensor.home_wetter_thunderstorm_probability_night_0d") | + round(0)}} %' + - service: !input command_text_printf + data: + component: weather01.a13 + message: '{{states("sensor.home_wetter_wind_night_0d") | round(0)}} km/h' + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''sunny''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=2 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''cloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=3 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=4 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''pouring''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=5 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''snowy''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=6 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''hail''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''snowy-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''fog''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=8 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''windy''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''windy-variant''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''lightning''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=10 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''partlycloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=11 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''lightning-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''execptional''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[0].condition + == ''clear-night''}}' + then: + - service: !input command_printf + data: + cmd: weather01.a03.pic=15 +##### Forcast Day 1 ##### + - service: !input command_text_printf + data: + component: weather02.a02 + message: '{{ date1 }}' + - service: !input command_text_printf + data: + component: weather02.a04 + message: '{{states("sensor.home_wetter_realfeel_temperature_min_1d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather02.a05 + message: '{{states("sensor.home_wetter_realfeel_temperature_max_1d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather02.a06 + message: '{{ state_attr("weather.home_wetter","forecast")[1].precipitation_probability}} + %' + - service: !input command_text_printf + data: + component: weather02.a07 + message: '{{states("sensor.home_wetter_hours_of_sun_1d") | round(0)}} h' + - service: !input command_text_printf + data: + component: weather02.a08 + message: '{{state_attr("sensor.home_wetter_uv_index_1d", "level")}}' + - service: !input command_text_printf + data: + component: weather02.a09 + message: '{{states("sensor.home_wetter_uv_index_1d") | round(0)}}' + - service: !input command_text_printf + data: + component: weather02.a10 + message: '{{states("sensor.home_wetter_thunderstorm_probability_day_1d") | round(0)}} + %' + - service: !input command_text_printf + data: + component: weather02.a11 + message: '{{states("sensor.home_wetter_wind_day_1d") | round(0)}} km/h' + - service: !input command_text_printf + data: + component: weather02.a12 + message: '{{states("sensor.home_wetter_thunderstorm_probability_night_1d") | + round(0)}} %' + - service: !input command_text_printf + data: + component: weather02.a13 + message: '{{states("sensor.home_wetter_wind_night_1d") | round(0)}} km/h' + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''sunny''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=2 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''cloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=3 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=4 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''pouring''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=5 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''snowy''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=6 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''hail''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''snowy-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''fog''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=8 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''windy''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''windy-variant''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''lightning''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=10 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''partlycloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=11 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''lightning-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''execptional''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[1].condition + == ''clear-night''}}' + then: + - service: !input command_printf + data: + cmd: weather02.a03.pic=15 +##### Forcast Day 2 ##### + - service: !input command_text_printf + data: + component: weather03.a02 + message: '{{ date2 }}' + - service: !input command_text_printf + data: + component: weather03.a04 + message: '{{states("sensor.home_wetter_realfeel_temperature_min_2d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather03.a05 + message: '{{states("sensor.home_wetter_realfeel_temperature_max_2d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather03.a06 + message: '{{ state_attr("weather.home_wetter","forecast")[2].precipitation_probability}} + %' + - service: !input command_text_printf + data: + component: weather03.a07 + message: '{{states("sensor.home_wetter_hours_of_sun_2d") | round(0)}} h' + - service: !input command_text_printf + data: + component: weather03.a08 + message: '{{state_attr("sensor.home_wetter_uv_index_2d", "level")}}' + - service: !input command_text_printf + data: + component: weather03.a09 + message: '{{states("sensor.home_wetter_uv_index_2d") | round(0)}}' + - service: !input command_text_printf + data: + component: weather03.a10 + message: '{{states("sensor.home_wetter_thunderstorm_probability_day_2d") | round(0)}} + %' + - service: !input command_text_printf + data: + component: weather03.a11 + message: '{{states("sensor.home_wetter_wind_day_2d") | round(0)}} km/h' + - service: !input command_text_printf + data: + component: weather03.a12 + message: '{{states("sensor.home_wetter_thunderstorm_probability_night_2d") | + round(0)}} %' + - service: !input command_text_printf + data: + component: weather03.a13 + message: '{{states("sensor.home_wetter_wind_night_2d") | round(0)}} km/h' + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''sunny''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=2 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''cloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=3 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=4 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''pouring''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=5 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''snowy''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=6 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''hail''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''snowy-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''fog''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=8 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''windy''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''windy-variant''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''lightning''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=10 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''partlycloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=11 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''lightning-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''execptional''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''clear-night''}}' + then: + - service: !input command_printf + data: + cmd: weather03.a03.pic=15 +##### Forcast Day 3 ##### + - service: !input command_text_printf + data: + component: weather04.a02 + message: '{{ date3 }}' + - service: !input command_text_printf + data: + component: weather04.a04 + message: '{{states("sensor.home_wetter_realfeel_temperature_min_3d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather04.a05 + message: '{{states("sensor.home_wetter_realfeel_temperature_max_3d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather04.a06 + message: '{{ state_attr("weather.home_wetter","forecast")[3].precipitation_probability}} + %' + - service: !input command_text_printf + data: + component: weather04.a07 + message: '{{states("sensor.home_wetter_hours_of_sun_3d") | round(0)}} h' + - service: !input command_text_printf + data: + component: weather04.a08 + message: '{{state_attr("sensor.home_wetter_uv_index_3d", "level")}}' + - service: !input command_text_printf + data: + component: weather04.a09 + message: '{{states("sensor.home_wetter_uv_index_3d") | round(0)}}' + - service: !input command_text_printf + data: + component: weather04.a10 + message: '{{states("sensor.home_wetter_thunderstorm_probability_day_3d") | round(0)}} + %' + - service: !input command_text_printf + data: + component: weather04.a11 + message: '{{states("sensor.home_wetter_wind_day_3d") | round(0)}} km/h' + - service: !input command_text_printf + data: + component: weather04.a12 + message: '{{states("sensor.home_wetter_thunderstorm_probability_night_3d") | + round(0)}} %' + - service: !input command_text_printf + data: + component: weather04.a13 + message: '{{states("sensor.home_wetter_wind_night_3d") | round(0)}} km/h' + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[2].condition + == ''sunny''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=2 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''cloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=3 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=4 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''pouring''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=5 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''snowy''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=6 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''hail''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''snowy-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''fog''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=8 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''windy''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''windy-variant''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''lightning''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=10 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''partlycloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=11 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''lightning-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''execptional''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[3].condition + == ''clear-night''}}' + then: + - service: !input command_printf + data: + cmd: weather04.a03.pic=15 +##### Forcast Day 4 ##### + - service: !input command_text_printf + data: + component: weather05.a02 + message: '{{ date4}}' + - service: !input command_text_printf + data: + component: weather05.a04 + message: '{{states("sensor.home_wetter_realfeel_temperature_min_4d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather05.a05 + message: '{{states("sensor.home_wetter_realfeel_temperature_max_4d") | round(0)}}°' + - service: !input command_text_printf + data: + component: weather05.a06 + message: '{{ state_attr("weather.home_wetter","forecast")[4].precipitation_probability}} + %' + - service: !input command_text_printf + data: + component: weather05.a07 + message: '{{states("sensor.home_wetter_hours_of_sun_4d") | round(0)}} h' + - service: !input command_text_printf + data: + component: weather05.a08 + message: '{{state_attr("sensor.home_wetter_uv_index_4d", "level")}}' + - service: !input command_text_printf + data: + component: weather05.a09 + message: '{{states("sensor.home_wetter_uv_index_4d") | round(0)}}' + - service: !input command_text_printf + data: + component: weather05.a10 + message: '{{states("sensor.home_wetter_thunderstorm_probability_day_4d") | round(0)}} + %' + - service: !input command_text_printf + data: + component: weather05.a11 + message: '{{states("sensor.home_wetter_wind_day_4d") | round(0)}} km/h' + - service: !input command_text_printf + data: + component: weather05.a12 + message: '{{states("sensor.home_wetter_thunderstorm_probability_night_4d") | + round(0)}} %' + - service: !input command_text_printf + data: + component: weather05.a13 + message: '{{states("sensor.home_wetter_wind_night_4d") | round(0)}} km/h' + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''sunny''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=2 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''cloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=3 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=4 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''pouring''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=5 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''snowy''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=6 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''hail''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''snowy-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=7 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''fog''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=8 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''windy''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''windy-variant''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=9 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''lightning''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=10 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''partlycloudy''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=11 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''lightning-rainy''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''execptional''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=13 + - if: + - condition: template + value_template: '{{state_attr(''weather.home_wetter'',''forecast'')[4].condition + == ''clear-night''}}' + then: + - service: !input command_printf + data: + cmd: weather05.a03.pic=15 ######################################### #