diff --git a/BETA Version/BETA_blueprint.yaml b/BETA Version/BETA_blueprint.yaml deleted file mode 100644 index 1c02a72..0000000 --- a/BETA Version/BETA_blueprint.yaml +++ /dev/null @@ -1,1457 +0,0 @@ -blueprint: - name: BETA - NSPanel Button synchronize - description: BETA - Synchronize NSpanel Button with HA Entities and Back! - domain: automation - input: - last_click: - name: NSPanel "last click" - description: 'Select NSPanel **"last click"** where the commands should be monitored' - selector: - entity: {} - last_click_coversettings: - name: NSPanel "last click coversettings" - description: 'Select NSPanel **"last click coversettings"** where the commands for Page Coversettings should be monitored (same NSPanel as **"last click"**)' - selector: - entity: {} - last_click_lightsettings: - name: NSPanel "last click lightsettings" - description: 'Select NSPanel **"last click lightsettings"** where the commands for Page Lightsettings should be monitored (same NSPanel as **"last click"**)' - selector: - entity: {} - nextion_inited: - name: NSPanel "Nextion Switch - nextion_inited" - description: 'nextion_inited is set up via esphome and shows the state of the Nspanel - NSPanel ready after Reboot (same NSPanel as **"last click"**) Example *"switch.nspanel_buro_nextion_inited"*' - selector: - entity: {} - command_printf: - name: Light Settings Page JUMP - description: 'Service for jump to the light settings (same NSPanel as **"last click"**) Example *"esphome.nspanel_buero_send_command_printf"*' - default: esphome.nspanel_buero_send_command_printf - selector: - text: {} - command_value: - name: Sync Button Funktion - description: 'Service to synchronize HA Entity State (ON/OFF) to NSPanel Button Page(same NSPanel as **"last click"**) Example *"esphome.nspanel_buero_send_command_value"*' - default: esphome.nspanel_buero_send_command_value - selector: - text: {} - command_text_printf: - name: Sync Light Status - description: 'Service to synchronize Eintity States to NSPanel Lightsettings (same NSPanel as **"last click"**) Example *"esphome.nspanel_buero_send_command_text_printf"*' - default: esphome.nspanel_buero_send_command_text_printf - selector: - text: {} - tft_path: - name: Path for Nextion TFT File - description: 'TFT Path where the Nextion TFT File is stored (same NSPanel as **"last click"**) Example *"/config/www/nspanel/buero/nspanel_buero.tft"*' - default: /config/www/nspanel/buero/nspanel_buero.tft - selector: - text: {} - entity01: - name: Button 01 - description: 'Nextion Editor' - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity02: - name: Button 02 - description: 'Nextion Editor' - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - - entity03: - name: Button 03 - description: 'Nextion Editor' - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - - -mode: parallel -max: 500 - -######################################### -# -# -############################################################# -##### CLOSE - INPUT ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - Variables ##### -############################################################# -# -# -######################################### -trigger_variables: - last_click: !input 'last_click' - last_click_lightsettings: !input 'last_click_lightsettings' - last_click_coversettings: !input 'last_click_coversettings' - -variables: - command_value: !input 'command_value' - command_text_printf: !input 'command_text_printf' - command_printf: !input 'command_printf' - tft_path: !input 'tft_path' - nextion_inited: !input 'nextion_inited' - - -##### Buttons ##### - entity01: !input 'entity01' - entity02: !input 'entity02' - entity03: !input 'entity03' - -######################################### -# -# -############################################################# -##### CLOSE - Variables ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - Trigger ##### -############################################################# -# -# -######################################### - -trigger: -##### Page Button - Trigger ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input 'last_click' - id: short_press - -##### Button LONG Press for jump to Lightsetting or Coversetting Page - Trigger ##### - - platform: template - value_template: '{{ states(last_click) is match "press" }}' - for: - seconds: 2 - id: long_press - -##### Page Lightsettings - Trigger ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input 'last_click_lightsettings' - id: light_settings - -##### Page Coversettings - Trigger ##### - - platform: event - event_type: state_changed - event_data: - entity_id: !input 'last_click_coversettings' - id: cover_settings - -#### Weather - Trigger #### - - platform: time_pattern - minutes: '10' - id: weather - - platform: state - entity_id: !input 'nextion_inited' - to: 'on' - id: weather - -##### TFT Upload ##### - - platform: event - event_type: folder_watcher - event_data: - event_type: modified - path: !input 'tft_path' - id: tft_upload - -##### Button01 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity01' - for: - seconds: 1 - id: current_state_entity01 - -##### Button02 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity02' - for: - seconds: 1 - id: current_state_entity02 - -##### Button03 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity03' - for: - seconds: 1 - id: current_state_entity03 - -######################################### -# -# -############################################################# -##### CLOSE - Trigger ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - Action ##### -############################################################# -# -# -######################################### -action: - - variables: -##### Entity - Page Button - Toggle Entity ##### - entity_short: >- - {%- if states(last_click) == "releasebuttonpage01button01" -%} {{ entity01 }} - {%- elif states(last_click) == "releasebuttonpage01button02" -%} {{ entity02 }} - {%- elif states(last_click) == "releasebuttonpage01button03" -%} {{ entity03 }} - {%- endif -%} - -##### Entity - Page Lightsettings ##### - entity_long: >- - {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01 }} - {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02 }} - {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ entity03 }} - {%- endif -%} - -##### Entity - Page Lightsettings - Skip Back ##### - entity_back: >- - {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ "page buttonpage01" }} - {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ "page buttonpage01" }} - {%- endif -%} - -##### Page Button - SHORT Press - Toggle ##### - - choose: - - conditions: - - condition: trigger - id: short_press - sequence: - - service: >- - {% if entity_short is match 'light.' %} - light.toggle - {% elif entity_short is match 'switch.' %} - switch.toggle - {% elif entity_short is match 'cover.' %} - cover.toggle - {% elif entity_short is match 'input_boolean.' %} - input_boolean.toggle - {% endif %} - data: - entity_id: '{{ entity_short }}' - -##### Page Lightsettings - JUMP to Page Lightsettings and SYNC Light Settings ##### - - choose: - - conditions: - - condition: trigger - id: long_press - - condition: template - value_template: '{{ entity_long is match "light." }}' - sequence: - - service: !input command_printf - data: - cmd: page lightsettings - - service: !input command_text_printf - data: - component: lightsettings.a03 - message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 254) |round(0) }}' - - service: !input command_text_printf - data: - component: lightsettings.a04 - message: '{{ state_attr(entity_long, "color_temp") |int }}' - -##### Page Lightsettings - SYNC Light Button ON / OFF ##### - - choose: - - conditions: - - condition: trigger - id: long_press - - condition: template - value_template: '{{ states(entity_long) == "on" }}' - sequence: - - service: !input command_value - data: - component: lightsettings.a06 - message: 1 - -##### Page Lightsettings - Brightness Slider ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) is match "brightness\d+" }}' - sequence: - - service: light.turn_on - data: - entity_id: '{{ entity_long }}' - brightness_pct: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}' - - service: !input command_text_printf - data: - component: lightsettings.a03 - message: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}' - -##### Page Lightsettings - Color_Temp Slider ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) is match "colortemp\d+" }}' - sequence: - - service: light.turn_on - data: - entity_id: '{{ entity_long }}' - color_temp: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' - - service: !input command_text_printf - data: - component: lightsettings.a04 - message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' - -##### Page Lightsettings - Color RGB Slider ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) is match "\d+,\d+,\d+" }}' - sequence: - - service: light.turn_on - data: - entity_id: '{{ entity_long }}' - rgb_color: '{{ states(last_click_lightsettings).split(",") }}' - -##### Page Lightsettings - Toggle Light ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) == "releaselight" }}' - sequence: - - service: light.toggle - data: - entity_id: '{{ entity_long }}' - - delay: - milliseconds: 250 - - service: !input command_text_printf - data: - component: lightsettings.a03 - message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 254) |round(0) }}' - - service: !input command_text_printf - data: - component: lightsettings.a04 - message: '{{ state_attr(entity_long, "color_temp") |int }}' - -##### Page Lightsettings - Close Lightsettings ##### - - choose: - - conditions: - - condition: trigger - id: light_settings - - condition: template - value_template: '{{ states(last_click_lightsettings) == "releaselightsettingsclose" }}' - sequence: - - service: !input command_printf - data: - cmd: '{{ entity_back }}' - -##### Page Coversettings - JUMP to Page Coversettings and SYNC Cover Settings ##### - - choose: - - conditions: - - condition: trigger - id: long_press - - condition: template - value_template: '{{ entity_long is match "cover." }}' - sequence: - - service: !input command_printf - data: - cmd: page coversettings - - service: !input command_text_printf - data: - component: coversettings.a03 - message: '{{ (state_attr(entity_long, "position") | int ) |round(0) }}' - - service: !input command_text_printf - data: - component: coversettings.a04 - message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }}' - -##### Page Coversettings - SYNC Cover Button ON / OFF ##### - - choose: - - conditions: - - condition: trigger - id: long_press - - condition: template - value_template: '{{ states(entity_long) == "open" }}' - sequence: - - service: !input command_value - data: - component: coversettings.a06 - message: 1 - -##### Page Coversettings - Cover Slider ##### - - choose: - - conditions: - - condition: trigger - id: cover_settings - - condition: template - value_template: '{{ states(last_click_coversettings) is match "coverposition\d+" }}' - sequence: - - service: cover.set_cover_position - data: - entity_id: '{{ entity_long }}' - position: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}' - - service: !input command_text_printf - data: - component: coversettings.a03 - message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}' - -##### Page Coversettings - Toggle Cover ##### - - choose: - - conditions: - - condition: trigger - id: cover_settings - - condition: template - value_template: '{{ states(last_click_coversettings) == "releasecover" }}' - sequence: - - service: cover.toggle - data: - entity_id: '{{ entity_long }}' - - delay: - milliseconds: 250 - - service: !input command_text_printf - data: - component: coversettings.a03 - message: '{{ (state_attr(entity_long, "position") | int ) |round(0) }}' - -##### Page Coversettings - Close Coversettings ##### - - choose: - - conditions: - - condition: trigger - id: cover_settings - - condition: template - value_template: '{{ states(last_click_coversettings) == "releasecoversettingsclose" }}' - sequence: - - service: !input command_printf - data: - cmd: '{{ entity_back }}' - -##### TFT Upload Automation ##### - - choose: - - conditions: - - condition: trigger - id: tft_upload - sequence: - - delay: - seconds: 2 - - service: esphome.nspanel_buero_upload_tft - data: {} - -######################################### -# -# -############################################################# -##### CLOSE - START - Action ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - HA Button SYNC ##### -############################################################# -# -# -######################################### - -##### Button01 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity01 -# - "{{ is_state('entity01', 'on' or 'open') }}" - - condition: state - entity_id: !input entity01 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button01 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity01 -# - "{{ is_state('entity01', 'off' or 'closed') }}" - - condition: state - entity_id: !input entity01 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button01 - message: 0 - -##### Button02 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity02 - - condition: state - entity_id: !input entity02 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button02 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity02 - - condition: state - entity_id: !input entity02 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button02 - message: 0 - -##### Button03 ################################################################# -#################### - - choose: - - conditions: - - condition: trigger - id: current_state_entity03 - - condition: state - entity_id: !input entity03 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button03 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity03 - - condition: state - entity_id: !input entity03 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button03 - message: 0 -######################################### -# -# -############################################################# -##### CLOSE - HA Button SYNC ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - Weather Forcast ##### -############################################################# -# -# -######################################### - - choose: - - conditions: - - condition: trigger - id: weather - sequence: - - service: !input command_text_printf - data: - component: weather01.a02 - message: '{{states("sensor.wochentag")}}' - - 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 - - service: !input command_text_printf - data: - component: weather02.a02 - message: '{{states("sensor.wochentag01")}}' - - 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 - - service: !input command_text_printf - data: - component: weather03.a02 - message: '{{states("sensor.wochentag02")}}' - - 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 - - service: !input command_text_printf - data: - component: weather04.a02 - message: '{{states("sensor.wochentag03")}}' - - 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'')[3].condition - == ''sunny''}}' - then: - - service: !input command_printf - data: - md: 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 - - service: !input command_text_printf - data: - component: weather05.a02 - message: '{{states("sensor.wochentag04")}}' - - 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 - - ######################################### -# -# -############################################################# -##### CLOSE - Weather Forcast ##### -############################################################# -# -## -### -#############################################################################################################################################################################################