diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..277feeb Binary files /dev/null and b/.DS_Store differ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a04b218 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.yaml": "home-assistant" + } +} \ No newline at end of file diff --git a/blueprint.yaml b/blueprint.yaml index 0a16989..5f09737 100644 --- a/blueprint.yaml +++ b/blueprint.yaml @@ -1,52 +1,135 @@ +############################################################# +##### START - INPUT ##### +############################################################# + blueprint: name: NSPanel Configuration - description: Synchronize NSpanel Button with HA Entities and Back! And many other things! + description: v2.0.0 - Configuration and synchronization NSpanele via Blueprint 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 + nspanel_name: + name: ESPhome Node Name + description: 'Here you have to enter the exact same name "node_name" as in the ESPHome file. Example nspanel_name' + default: [nspanel_name] 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 + language: + name: Language for NSPanel + description: 'select your language for the NSPanel Display' 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: {} + select: + options: + - DE + - EN 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 + name: Nextion TFT File Folder for the service Folder Watcher + description: 'TFT Path where the Nextion TFT File is stored ESPHome Example *"/config/www/nspanel/nspanel.tft"* Attention! The folder watcher must also be configured in the configuration.yaml. Only needed for manual upload of the TFT file. See HowTo' + default: [/config/www/nspanel/nspanel.tft] selector: text: {} + delay: + name: Delay to avoid sync problems (coming soon) + description: 'Synchronization Problems may occur due to the NETWORK / WLAN. To avoid this problem enter your value for the delay (milliseconds)' + default: ["10"] + selector: + text: {} + sync_value_ha: + name: Synchronization of all values from HA to NSPanel for Lightsetting and Coversetting Page. + description: 'Synchronization of values between HA and NSPanel for Lightsetting and Coversetting Page -> Maybe causes number jumps' + default: 'No' + selector: + select: + options: + - label: 'No' + value: select_no + - label: 'Yes' + value: select_yes + sync_slider_ha: + name: Synchronization of all Sliders from HA to NSPanel for LIGHTSETTING and COVERSETTING Page. + description: 'Synchronization of sliders between HA and NSPanel for Lightsetting and Coversetting Page -> Maybe causes flickering on the Slider' + default: 'No' + selector: + select: + options: + - label: 'No' + value: select_no + - label: 'Yes' + value: select_yes + weather: + name: Weather Integration + description: 'select our Weather Integration' + selector: + select: + options: + - Default + - AccuWeather + accuweather: + name: Name assigned to the AccuWeather Integration (Optional) + description: 'If you use Accuweather Integration, the name of the Accuweather Integration must be entered here. ATTENTION! You must enter the name as specified in the entity. Example name is *"Home"* Weather then please write *"home_weather"*' + default: [] + selector: + text: {} + outdoortemp: + name: Outdoor Temperature Sensor (Optional) + description: 'If no outdoor sensor is available, leave the field empty. If this field is not filled in, the outdoor temperature will be taken from your selected weather integration. If an entity is selected, the value is displayed on the *"Home Page"* and *"Thermostat Page"*' + default: [] + selector: + entity: + domain: + - sensor + humidity: + name: Humidity Sensor (Optional) + description: 'If an entity is selected, the value is displayed on the *"Home Page"*' + default: [] + selector: + entity: + domain: + - sensor + hotwatertemp: + name: Hot Water Temperature Sensor (Optional) + description: 'If an entity is selected, the value is displayed on the *"Home Page"* and *"Thermostat Page"*' + default: [] + selector: + entity: + domain: + - sensor + left_button_entity: + name: Left Button (Optional) + description: 'Left Hardware Button - Select the entity that should be switched' + default: [] + selector: + entity: + domain: + - light + - switch + - input_boolean + - cover + + left_button_name: + name: Name "Left Button" (Optional) + description: 'Left Button label - 10 characters are supported' + default: [] + selector: + text: {} + right_button_entity: + name: Right Button (Optional) + description: 'Right Hardware Button - Select the entity that should be switched' + default: [] + selector: + entity: + domain: + - light + - switch + - input_boolean + - cover + right_button_name: + name: Name "Right Button" (Optional) + description: 'Right Button label - 10 characters are supported' + default: [] + selector: + text: {} + + ##### Button ##### entity01: name: Button 01 (Optional) description: Nextion Editor - *buttonpage01.button01* **(ONLY light | switch | cover | input_boolean)** @@ -58,6 +141,12 @@ blueprint: - switch - cover - input_boolean + entity01_name: + name: Name "Button 01" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity02: name: Button 02 (Optional) description: Nextion Editor - *buttonpage01.button02* **(ONLY light | switch | cover | input_boolean)** @@ -69,6 +158,12 @@ blueprint: - switch - cover - input_boolean + entity02_name: + name: Name "Button 02" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity03: name: Button 03 (Optional) description: Nextion Editor - *buttonpage01.button03* **(ONLY light | switch | cover | input_boolean)** @@ -80,6 +175,12 @@ blueprint: - switch - cover - input_boolean + entity03_name: + name: Name "Button 03" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity04: name: Button 04 (Optional) description: Nextion Editor - *buttonpage01.button04* **(ONLY light | switch | cover | input_boolean)** @@ -91,6 +192,12 @@ blueprint: - switch - cover - input_boolean + entity04_name: + name: Name "Button 04" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity05: name: Button 05 (Optional) description: Nextion Editor - *buttonpage01.button05* **(ONLY light | switch | cover | input_boolean)** @@ -102,6 +209,12 @@ blueprint: - switch - cover - input_boolean + entity05_name: + name: Name "Button 05" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity06: name: Button 06 (Optional) description: Nextion Editor - *buttonpage01.button06* **(ONLY light | switch | cover | input_boolean)** @@ -113,6 +226,12 @@ blueprint: - switch - cover - input_boolean + entity06_name: + name: Name "Button 06" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity07: name: Button 07 (Optional) description: Nextion Editor - *buttonpage01.button07* **(ONLY light | switch | cover | input_boolean)** @@ -124,6 +243,12 @@ blueprint: - switch - cover - input_boolean + entity07_name: + name: Name "Button 07" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity08: name: Button 08 (Optional) description: Nextion Editor - *buttonpage01.button08* **(ONLY light | switch | cover | input_boolean)** @@ -135,6 +260,12 @@ blueprint: - switch - cover - input_boolean + entity08_name: + name: Name "Button 08" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity09: name: Button 09 (Optional) description: Nextion Editor - *buttonpage02.button01* **(ONLY light | switch | cover | input_boolean)** @@ -146,6 +277,12 @@ blueprint: - switch - cover - input_boolean + entity09_name: + name: Name "Button 09" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity10: name: Button 10 (Optional) description: Nextion Editor - *buttonpage02.button02* **(ONLY light | switch | cover | input_boolean)** @@ -157,6 +294,12 @@ blueprint: - switch - cover - input_boolean + entity10_name: + name: Name "Button 10" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity11: name: Button 11 (Optional) description: Nextion Editor - *buttonpage02.button03* **(ONLY light | switch | cover | input_boolean)** @@ -168,6 +311,12 @@ blueprint: - switch - cover - input_boolean + entity11_name: + name: Name "Button 11" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity12: name: Button 12 (Optional) description: Nextion Editor - *buttonpage02.button04* **(ONLY light | switch | cover | input_boolean)** @@ -179,6 +328,12 @@ blueprint: - switch - cover - input_boolean + entity12_name: + name: Name "Button 12" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity13: name: Button 13 (Optional) description: Nextion Editor - *buttonpage01.button05* **(ONLY light | switch | cover | input_boolean)** @@ -190,6 +345,12 @@ blueprint: - switch - cover - input_boolean + entity13_name: + name: Name "Button 13" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity14: name: Button 14 (Optional) description: Nextion Editor - *buttonpage02.button06* **(ONLY light | switch | cover | input_boolean)** @@ -201,6 +362,12 @@ blueprint: - switch - cover - input_boolean + entity14_name: + name: Name "Button 14" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity15: name: Button 15 (Optional) description: Nextion Editor - *buttonpage02.button07* **(ONLY light | switch | cover | input_boolean)** @@ -212,6 +379,12 @@ blueprint: - switch - cover - input_boolean + entity15_name: + name: Name "Button 15" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity16: name: Button 16 (Optional) description: Nextion Editor - *buttonpage02.button08* **(ONLY light | switch | cover | input_boolean)** @@ -223,6 +396,12 @@ blueprint: - switch - cover - input_boolean + entity16_name: + name: Name "Button 16" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity17: name: Button 17 (Optional) description: Nextion Editor - *buttonpage03.button01* **(ONLY light | switch | cover | input_boolean)** @@ -234,6 +413,12 @@ blueprint: - switch - cover - input_boolean + entity17_name: + name: Name "Button 17" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity18: name: Button 18 (Optional) description: Nextion Editor - *buttonpage03.button02* **(ONLY light | switch | cover | input_boolean)** @@ -245,6 +430,12 @@ blueprint: - switch - cover - input_boolean + entity18_name: + name: Name "Button 18" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity19: name: Button 19 (Optional) description: Nextion Editor - *buttonpage03.button03* **(ONLY light | switch | cover | input_boolean)** @@ -256,6 +447,12 @@ blueprint: - switch - cover - input_boolean + entity19_name: + name: Name "Button 19" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity20: name: Button 20 (Optional) description: Nextion Editor - *buttonpage03.button04* **(ONLY light | switch | cover | input_boolean)** @@ -267,6 +464,12 @@ blueprint: - switch - cover - input_boolean + entity20_name: + name: Name "Button 20" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity21: name: Button 21 (Optional) description: Nextion Editor - *buttonpage03.button05* **(ONLY light | switch | cover | input_boolean)** @@ -278,6 +481,12 @@ blueprint: - switch - cover - input_boolean + entity21_name: + name: Name "Button 21" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity22: name: Button 22 (Optional) description: Nextion Editor - *buttonpage03.button06* **(ONLY light | switch | cover | input_boolean)** @@ -289,6 +498,12 @@ blueprint: - switch - cover - input_boolean + entity22_name: + name: Name "Button 22" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity23: name: Button 23 (Optional) description: Nextion Editor - *buttonpage03.button07* **(ONLY light | switch | cover | input_boolean)** @@ -300,6 +515,12 @@ blueprint: - switch - cover - input_boolean + entity23_name: + name: Name "Button 23" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity24: name: Button 24 (Optional) description: Nextion Editor - *buttonpage03.button08* **(ONLY light | switch | cover | input_boolean)** @@ -311,6 +532,12 @@ blueprint: - switch - cover - input_boolean + entity24_name: + name: Name "Button 24" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity25: name: Button 25 (Optional) description: Nextion Editor - *buttonpage04.button01* **(ONLY light | switch | cover | input_boolean)** @@ -322,6 +549,12 @@ blueprint: - switch - cover - input_boolean + entity25_name: + name: Name "Button 25" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity26: name: Button 26 (Optional) description: Nextion Editor - *buttonpage04.button02* **(ONLY light | switch | cover | input_boolean)** @@ -333,6 +566,12 @@ blueprint: - switch - cover - input_boolean + entity26_name: + name: Name "Button 26" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity27: name: Button 27 (Optional) description: Nextion Editor - *buttonpage04.button03* **(ONLY light | switch | cover | input_boolean)** @@ -344,6 +583,12 @@ blueprint: - switch - cover - input_boolean + entity27_name: + name: Name "Button 27" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity28: name: Button 28 (Optional) description: Nextion Editor - *buttonpage04.button04* **(ONLY light | switch | cover | input_boolean)** @@ -355,6 +600,12 @@ blueprint: - switch - cover - input_boolean + entity28_name: + name: Name "Button 28" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity29: name: Button 29 (Optional) description: Nextion Editor - *buttonpage04.button05* **(ONLY light | switch | cover | input_boolean)** @@ -366,6 +617,12 @@ blueprint: - switch - cover - input_boolean + entity29_name: + name: Name "Button 29" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity30: name: Button 30 (Optional) description: Nextion Editor - *buttonpage04.button06* **(ONLY light | switch | cover | input_boolean)** @@ -377,6 +634,12 @@ blueprint: - switch - cover - input_boolean + entity30_name: + name: Name "Button 30" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity31: name: Button 31 (Optional) description: Nextion Editor - *buttonpage04.button07* **(ONLY light | switch | cover | input_boolean)** @@ -388,6 +651,12 @@ blueprint: - switch - cover - input_boolean + entity31_name: + name: Name "Button 31" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} entity32: name: Button 32 (Optional) description: Nextion Editor - *buttonpage04.button08* **(ONLY light | switch | cover | input_boolean)** @@ -399,539 +668,568 @@ blueprint: - switch - cover - input_boolean - entity33: - name: Button 33 (Optional) - description: Nextion Editor - *buttonpage05.button01* **(ONLY light | switch | cover | input_boolean)** + entity32_name: + name: Name "Button 32" (Optional) + description: Button label - 10 characters are supported default: [] selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity34: - name: Button 34 (Optional) - description: Nextion Editor - *buttonpage05.button02* **(ONLY light | switch | cover | input_boolean)** - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity35: - name: Button 35 (Optional) - description: Nextion Editor - *buttonpage05.button03* **(ONLY light | switch | cover | input_boolean)** - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity36: - name: Button 36 (Optional) - description: Nextion Editor - *buttonpage05.button04* **(ONLY light | switch | cover | input_boolean)** - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity37: - name: Button 37 (Optional) - description: Nextion Editor - *buttonpage05.button05* **(ONLY light | switch | cover | input_boolean)** - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity38: - name: Button 38 (Optional) - description: Nextion Editor - *buttonpage05.button06* **(ONLY light | switch | cover | input_boolean)** - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity39: - name: Button 39 (Optional) - description: Nextion Editor - *buttonpage05.button07* **(ONLY light | switch | cover | input_boolean)** - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean - entity40: - name: Button 40 (Optional) - description: Nextion Editor - *buttonpage05.button08* **(ONLY light | switch | cover | input_boolean)** - default: [] - selector: - entity: - domain: - - light - - switch - - cover - - input_boolean + text: {} mode: parallel -max: 500 +max: 5000 -######################################### -# -# ############################################################# ##### 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' + nspanel_name_trigger: !input "nspanel_name" + last_click: "sensor.{{ nspanel_name_trigger }}_last_click" + last_click_lightsettings: "sensor.{{ nspanel_name_trigger }}_last_click_lightsettings" + last_click_coversettings: "sensor.{{ nspanel_name_trigger }}_last_click_coversettings" + last_click_weathersettings: "sensor.{{ nspanel_name_trigger }}_last_click_weathersettings" + left_button: "binary_sensor.{{ nspanel_name_trigger }}_left_button" + right_button: "binary_sensor.{{ nspanel_name_trigger }}_right_button" + weather_forcast_button: "binary_sensor.{{ nspanel_name_trigger }}_weather_forcast" + nextion_inited_trigger: "switch.{{ nspanel_name_trigger }}_nextion_inited" + entity_long_trigger: "{{ entity_long }}" variables: - 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' + ##### GENERAL ##### + nspanel_name: !input "nspanel_name" + time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}" + weather: !input "weather" + language: !input "language" -##### Buttons ##### - entity01: !input 'entity01' - entity02: !input 'entity02' - entity03: !input 'entity03' - entity04: !input 'entity04' - entity05: !input 'entity05' - entity06: !input 'entity06' - entity07: !input 'entity07' - entity08: !input 'entity08' - entity09: !input 'entity09' - entity10: !input 'entity10' - entity11: !input 'entity11' - entity12: !input 'entity12' - entity13: !input 'entity13' - entity14: !input 'entity14' - entity15: !input 'entity15' - entity16: !input 'entity16' - entity17: !input 'entity17' - entity18: !input 'entity18' - entity19: !input 'entity19' - entity20: !input 'entity20' - entity21: !input 'entity21' - entity22: !input 'entity22' - entity23: !input 'entity23' - entity24: !input 'entity24' - entity25: !input 'entity25' - entity26: !input 'entity26' - entity27: !input 'entity27' - entity28: !input 'entity28' - entity29: !input 'entity29' - entity30: !input 'entity30' - entity31: !input 'entity31' - entity32: !input 'entity32' - entity33: !input 'entity33' - entity34: !input 'entity34' - entity35: !input 'entity35' - entity36: !input 'entity36' - entity37: !input 'entity37' - entity38: !input 'entity38' - entity39: !input 'entity39' - entity40: !input 'entity40' + ##### PUSH TO NEXTION DISPLAY ##### + command_text_printf: "esphome.{{ nspanel_name }}_send_command_text_printf" + command_value: "esphome.{{ nspanel_name }}_send_command_value" + command_printf: "esphome.{{ nspanel_name }}_send_command_printf" + command_font_color: "esphome.{{ nspanel_name }}_send_command_font_color" + command_background_color: "esphome.{{ nspanel_name }}_send_command_background_color" + + ###### SYNC SETTINGS ##### + delay_boot: !input "delay" + delay_value: !input "delay" + delay_jump_page: !input "delay" + sync_slider_ha: !input "sync_slider_ha" + sync_value_ha: !input "sync_value_ha" + + ##### TFT UPLOAD ##### + tft_upload: "esphome.{{ nspanel_name }}_upload_tft" + tft_path: !input "tft_path" + + ##### GENERAL ENTITYS ##### + humidity: !input "humidity" + hotwatertemp: !input "hotwatertemp" + outdoortemp: !input "outdoortemp" + + #### HARDWARE BUTTONS ##### + left_button_entity: !input "left_button_entity" + left_button_name: !input "left_button_name" + right_button_entity: !input "right_button_entity" + right_button_name: !input "right_button_name" + + ##### NEXTION PIC MAPPING ##### + cover_pic_closed: "106" + cover_pic_open: "107" + battery_icon: "108" + light_pic_off: "125" + light_pic_on: "126" + + weather_sunny: "2" + weather_cloudy: "3" + weather_rainy: "4" + weather_pouring: "5" + weather_snowy: "6" + weather_hail: "7" + weather_snowy_rainy: "7" + weather_fog: "8" + weather_windy: "9" + weather_windy_variant: "9" + weather_lightning: "10" + weather_partlycloudy_day: "11" + weather_partlycloudy_night: "12" + weather_lightning_rainy_day: "13" + weather_lightning_rainy_night: "14" + weather_execptional_day: "13" + weather_execptional_night: "14" + weather_clear_night: "15" + + weather_icon_blank: "53" + weather_icon_rain: "59" + weather_icon_sun: "60" + weather_icon_protect: "61" + weather_icon_lightning: "62" + weather_icon_wind: "63" + + ###### NEXTION COLOR BUTTON DESIGN ##### + button_light_off: "90" + button_light_on: "91" + button_switch_off: "92" + button_switch_on: "93" + button_cover_off: "94" + button_cover_on: "95" + button_color_1: "65535" + button_color_2: "10597" + + ##### DATE - DE ##### + date01_de: "{{ ((as_timestamp(now())) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date02_de: "{{ ((as_timestamp(now()) + 86400) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date03_de: "{{ ((as_timestamp(now()) + 172800) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date04_de: "{{ ((as_timestamp(now()) + 259200) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date05_de: "{{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + + ##### DATE - EN ##### + date01_en: "{{ ((as_timestamp(now())) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date02_en: "{{ ((as_timestamp(now()) + 86400) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date03_en: "{{ ((as_timestamp(now()) + 172800) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date04_en: "{{ ((as_timestamp(now()) + 259200) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date05_en: "{{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + + ##### DAY WEATHER FORCAST - DE ##### + day01_de: "Heute" + day02_de: "Morgen" + day03_de: "in 2 Tagen" + day04_de: "in 3 Tagen" + day05_de: "in 4 tagen" + + ##### DAY WEATHER FORCAST - EN ##### + day01_en: "Today" + day02_en: "Tomorrow" + day03_en: "in 2 Days" + day04_en: "in 3 Days" + day05_en: "in 4 Days" + + ##### WEATHER INTEGRATION - METEOROLOGISK HA DEFAULT ##### + ha_weather: "weather.home" + + ##### WEATHER INTEGRATION _ ACCUWEATHER ##### + accuweather: !input "accuweather" + accuweather_value: "weather.{{ accuweather }}" + + ##### FORCAST ACCUWEATHER - DAY 0 ##### + accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather }}_realfeel_temperature_min_0d" + accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather }}_realfeel_temperature_max_0d" + accuweather_hours_of_sun_0d: "sensor.{{ accuweather }}_hours_of_sun_0d" + accuweather_uv_index_0d: "sensor.{{ accuweather }}_uv_index_0d" + accuweather_thunderstorm_probability_day_0d: "sensor.{{ accuweather }}_thunderstorm_probability_day_0d" + accuweather_thunderstorm_probability_night_0d: "sensor.{{ accuweather }}_thunderstorm_probability_night_0d" + accuweather_wind_day_0d: "sensor.{{ accuweather }}_wind_day_0d" + accuweather_wind_night_0d: "sensor.{{ accuweather }}_wind_night_0d" + ##### FORCAST ACCUWEATHER - DAY 1 ##### + accuweather_realfeel_temperature_min_1d: "sensor.{{ accuweather }}_realfeel_temperature_min_1d" + accuweather_realfeel_temperature_max_1d: "sensor.{{ accuweather }}_realfeel_temperature_max_1d" + accuweather_hours_of_sun_1d: "sensor.{{ accuweather }}_hours_of_sun_1d" + accuweather_uv_index_1d: "sensor.{{ accuweather }}_uv_index_1d" + accuweather_thunderstorm_probability_day_1d: "sensor.{{ accuweather }}_thunderstorm_probability_day_1d" + accuweather_thunderstorm_probability_night_1d: "sensor.{{ accuweather }}_thunderstorm_probability_night_1d" + accuweather_wind_day_1d: "sensor.{{ accuweather }}_wind_day_1d" + accuweather_wind_night_1d: "sensor.{{ accuweather }}_wind_night_1d" + ##### FORCAST ACCUWEATHER - DAY 2 ##### + accuweather_realfeel_temperature_min_2d: "sensor.{{ accuweather }}_realfeel_temperature_min_2d" + accuweather_realfeel_temperature_max_2d: "sensor.{{ accuweather }}_realfeel_temperature_max_2d" + accuweather_hours_of_sun_2d: "sensor.{{ accuweather }}_hours_of_sun_2d" + accuweather_uv_index_2d: "sensor.{{ accuweather }}_uv_index_2d" + accuweather_thunderstorm_probability_day_2d: "sensor.{{ accuweather }}_thunderstorm_probability_day_2d" + accuweather_thunderstorm_probability_night_2d: "sensor.{{ accuweather }}_thunderstorm_probability_night_2d" + accuweather_wind_day_2d: "sensor.{{ accuweather }}_wind_day_2d" + accuweather_wind_night_2d: "sensor.{{ accuweather }}_wind_night_2d" + ##### FORCAST ACCUWEATHER - DAY 3 ##### + accuweather_realfeel_temperature_min_3d: "sensor.{{ accuweather }}_realfeel_temperature_min_3d" + accuweather_realfeel_temperature_max_3d: "sensor.{{ accuweather }}_realfeel_temperature_max_3d" + accuweather_hours_of_sun_3d: "sensor.{{ accuweather }}_hours_of_sun_3d" + accuweather_uv_index_3d: "sensor.{{ accuweather }}_uv_index_3d" + accuweather_thunderstorm_probability_day_3d: "sensor.{{ accuweather }}_thunderstorm_probability_day_3d" + accuweather_thunderstorm_probability_night_3d: "sensor.{{ accuweather }}_thunderstorm_probability_night_3d" + accuweather_wind_day_3d: "sensor.{{ accuweather }}_wind_day_3d" + accuweather_wind_night_3d: "sensor.{{ accuweather }}_wind_night_3d" + ##### FORCAST ACCUWEATHER - DAY 4 ##### + accuweather_realfeel_temperature_min_4d: "sensor.{{ accuweather }}_realfeel_temperature_min_4d" + accuweather_realfeel_temperature_max_4d: "sensor.{{ accuweather }}_realfeel_temperature_max_4d" + accuweather_hours_of_sun_4d: "sensor.{{ accuweather }}_hours_of_sun_4d" + accuweather_uv_index_4d: "sensor.{{ accuweather }}_uv_index_4d" + accuweather_thunderstorm_probability_day_4d: "sensor.{{ accuweather }}_thunderstorm_probability_day_4d" + accuweather_thunderstorm_probability_night_4d: "sensor.{{ accuweather }}_thunderstorm_probability_night_4d" + accuweather_wind_day_4d: "sensor.{{ accuweather }}_wind_day_4d" + accuweather_wind_night_4d: "sensor.{{ accuweather }}_wind_night_4d" + + ##### BUTTONS 1- 32 ##### + entity01: !input "entity01" + entity01_name: !input "entity01_name" + entity02: !input "entity02" + entity02_name: !input "entity02_name" + entity03: !input "entity03" + entity03_name: !input "entity03_name" + entity04: !input "entity04" + entity04_name: !input "entity04_name" + entity05: !input "entity05" + entity05_name: !input "entity05_name" + entity06: !input "entity06" + entity06_name: !input "entity06_name" + entity07: !input "entity07" + entity07_name: !input "entity07_name" + entity08: !input "entity08" + entity08_name: !input "entity08_name" + entity09: !input "entity09" + entity09_name: !input "entity09_name" + entity10: !input "entity10" + entity10_name: !input "entity10_name" + entity11: !input "entity11" + entity11_name: !input "entity11_name" + entity12: !input "entity12" + entity12_name: !input "entity12_name" + entity13: !input "entity13" + entity13_name: !input "entity13_name" + entity14: !input "entity14" + entity14_name: !input "entity14_name" + entity15: !input "entity15" + entity15_name: !input "entity15_name" + entity16: !input "entity16" + entity16_name: !input "entity16_name" + entity17: !input "entity17" + entity17_name: !input "entity17_name" + entity18: !input "entity18" + entity18_name: !input "entity18_name" + entity19: !input "entity19" + entity19_name: !input "entity19_name" + entity20: !input "entity20" + entity20_name: !input "entity20_name" + entity21: !input "entity21" + entity21_name: !input "entity21_name" + entity22: !input "entity22" + entity22_name: !input "entity22_name" + entity23: !input "entity23" + entity23_name: !input "entity23_name" + entity24: !input "entity24" + entity24_name: !input "entity24_name" + entity25: !input "entity25" + entity25_name: !input "entity25_name" + entity26: !input "entity26" + entity26_name: !input "entity26_name" + entity27: !input "entity27" + entity27_name: !input "entity27_name" + entity28: !input "entity28" + entity28_name: !input "entity28_name" + entity29: !input "entity29" + entity29_name: !input "entity29_name" + entity30: !input "entity30" + entity30_name: !input "entity30_name" + entity31: !input "entity31" + entity31_name: !input "entity31_name" + entity32: !input "entity32" + entity32_name: !input "entity32_name" -######################################### -# -# ############################################################# ##### 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 + ##### Trigger - General ################################################################################################################# -##### 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 + ###### DELME - Trigger "nspanel_boot_init" ###### - platform: state - entity_id: !input 'nextion_inited' - to: 'on' - id: weather + entity_id: input_boolean.trigger_nspanel_boot + to: "on" + id: nspanel_boot_init + + ##### Reboot - Trigger "nspanel_boot_init" ##### + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + id: nspanel_boot_init -##### TFT Upload ##### + ##### TFT Upload - Trigger "tft_upload" ##### - platform: event event_type: folder_watcher event_data: event_type: modified - path: !input 'tft_path' + path: !input "tft_path" id: tft_upload -##### Button01 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity01' + ##### Time - Trigger "time_state" ##### + - platform: time_pattern + minutes: "/1" + id: time_state + + #### Weather Temp - Trigger "weather_temp_state" #### + - platform: time_pattern + minutes: "10" + id: weather_temp_state + + #### Weather State - Trigger "weather_update_state" #### + - platform: template + value_template: '{{ states(last_click) is match "weather" }}' + id: weather_update_state + + #### Weather Time - Trigger "weather_update_time" #### -> kann gelöscht werden nah weather umbau + - platform: time_pattern + minutes: "10" + id: weather_update_time + + ##### Humidity - Trigger "humidity_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "humidity" + id: humidity_state + + ##### Hot Water - Trigger "hotwatertemp_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "hotwatertemp" + id: hotwatertemp_state + + ##### Outdoor Temp - Trigger "outdoortemp_state" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: !input "outdoortemp" + id: outdoortemp_state + + ##### Left Button - Trigger "left_button_press" ##### + - platform: template + value_template: '{{ states(left_button) is match "on" }}' + id: left_button_press + + ##### Right Button - Trigger "right_button_press" ##### + - platform: template + value_template: '{{ states(right_button) is match "on" }}' + id: right_button_press + + + + + ##### Trigger - Button General ################################################################################################################# + + ##### Page Button - Trigger "short_press" - SHORT Press via "last_click" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click }}" + id: short_press + + ##### Page Button - Trigger "long_press" - LONG Press via "last_click" - Button LONG Press for jump to Lightsetting or Coversetting Page ##### + - platform: template + value_template: '{{ states(last_click) is match "press" }}' for: seconds: 1 + id: long_press + + ##### Page Lightsettings - Trigger "light_settings" - Changes Lightsettings Page via "last_click_lightsettings" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_lightsettings }}" + id: light_settings + + ##### Page Coversettings - Trigger "cover_settings" - Changes Coversettings Page via "last_click_coversettings" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_coversettings }}" + id: cover_settings + + ##### Page Weather Forcast - Trigger "weather_settings" - Changes Weather Page via "last_click_weathersettings" ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_weathersettings }}" + id: weather_settings + + ##### Page Button - Trigger "button_page" Entity sync ##### + - platform: template + value_template: '{{ states(last_click) is match "button" }}' + id: button_page + + + + ##### Trigger - Button State change ################################################################################################################# + + ##### Button01 Sync - Trigger "current_state_entity01" ##### + - platform: state + entity_id: !input "entity01" id: current_state_entity01 -##### Button02 Sync - Trigger ##### + ##### Button02 Sync - Trigger "current_state_entity02" ##### - platform: state - entity_id: !input 'entity02' - for: - seconds: 1 + entity_id: !input "entity02" id: current_state_entity02 -##### Button03 Sync - Trigger ##### + ##### Button03 Sync - Trigger "current_state_entity03" ##### - platform: state - entity_id: !input 'entity03' - for: - seconds: 1 + entity_id: !input "entity03" id: current_state_entity03 -##### Button04 Sync - Trigger ##### + ##### Button04 Sync - Trigger "current_state_entity04" ##### - platform: state - entity_id: !input 'entity04' - for: - seconds: 1 + entity_id: !input "entity04" id: current_state_entity04 -##### Button05 Sync - Trigger ##### + ##### Button05 Sync - Trigger "current_state_entity05" ##### - platform: state - entity_id: !input 'entity05' - for: - seconds: 1 + entity_id: !input "entity05" id: current_state_entity05 -##### Button06 Sync - Trigger ##### + ##### Button06 Sync - Trigger "current_state_entity06" ##### - platform: state - entity_id: !input 'entity06' - for: - seconds: 1 + entity_id: !input "entity06" id: current_state_entity06 -##### Button07 Sync - Trigger ##### + ##### Button07 Sync - Trigger "current_state_entity07" ##### - platform: state - entity_id: !input 'entity07' - for: - seconds: 1 + entity_id: !input "entity07" id: current_state_entity07 -##### Button08 Sync - Trigger ##### + ##### Button08 Sync - Trigger "current_state_entity08" ##### - platform: state - entity_id: !input 'entity08' - for: - seconds: 1 + entity_id: !input "entity08" id: current_state_entity08 -##### Button09 Sync - Trigger ##### + ##### Button09 Sync - Trigger "current_state_entity09" ##### - platform: state - entity_id: !input 'entity09' - for: - seconds: 1 + entity_id: !input "entity09" id: current_state_entity09 -##### Button10 Sync - Trigger ##### + ##### Button10 Sync - Trigger "current_state_entity10" ##### - platform: state - entity_id: !input 'entity10' - for: - seconds: 1 + entity_id: !input "entity10" id: current_state_entity10 -##### Button11 Sync - Trigger ##### + ##### Button11 Sync - Trigger "current_state_entity11" ##### - platform: state - entity_id: !input 'entity11' - for: - seconds: 1 + entity_id: !input "entity11" id: current_state_entity11 -##### Button12 Sync - Trigger ##### + ##### Button12 Sync - Trigger "current_state_entity12" ##### - platform: state - entity_id: !input 'entity12' - for: - seconds: 1 + entity_id: !input "entity12" id: current_state_entity12 -##### Button13 Sync - Trigger ##### + ##### Button13 Sync - Trigger "current_state_entity13" ##### - platform: state - entity_id: !input 'entity13' - for: - seconds: 1 + entity_id: !input "entity13" id: current_state_entity13 -##### Button14 Sync - Trigger ##### + ##### Button14 Sync - Trigger "current_state_entity14" ##### - platform: state - entity_id: !input 'entity14' - for: - seconds: 1 + entity_id: !input "entity14" id: current_state_entity14 -##### Button15 Sync - Trigger ##### + ##### Button15 Sync - Trigger "current_state_entity15" ##### - platform: state - entity_id: !input 'entity15' - for: - seconds: 1 + entity_id: !input "entity15" id: current_state_entity15 -##### Button16 Sync - Trigger ##### + ##### Button16 Sync - Trigger "current_state_entity16" ##### - platform: state - entity_id: !input 'entity16' - for: - seconds: 1 + entity_id: !input "entity16" id: current_state_entity16 -##### Button17 Sync - Trigger ##### + ##### Button17 Sync - Trigger "current_state_entity17" ##### - platform: state - entity_id: !input 'entity17' - for: - seconds: 1 + entity_id: !input "entity17" id: current_state_entity17 -##### Button18 Sync - Trigger ##### + ##### Button18 Sync - Trigger "current_state_entity18" ##### - platform: state - entity_id: !input 'entity18' - for: - seconds: 1 + entity_id: !input "entity18" id: current_state_entity18 -##### Button19 Sync - Trigger ##### + ##### Button19 Sync - Trigger "current_state_entity19" ##### - platform: state - entity_id: !input 'entity19' - for: - seconds: 1 + entity_id: !input "entity19" id: current_state_entity19 -##### Button20 Sync - Trigger ##### + ##### Button20 Sync - Trigger "current_state_entity20" ##### - platform: state - entity_id: !input 'entity20' - for: - seconds: 1 + entity_id: !input "entity20" id: current_state_entity20 -##### Button21 Sync - Trigger ##### + ##### Button21 Sync - Trigger "current_state_entity21" ##### - platform: state - entity_id: !input 'entity21' - for: - seconds: 1 + entity_id: !input "entity21" id: current_state_entity21 -##### Button22 Sync - Trigger ##### + ##### Button22 Sync - Trigger "current_state_entity22" ##### - platform: state - entity_id: !input 'entity22' - for: - seconds: 1 + entity_id: !input "entity22" id: current_state_entity22 -##### Button23 Sync - Trigger ##### + ##### Button23 Sync - Trigger "current_state_entity23" ##### - platform: state - entity_id: !input 'entity23' - for: - seconds: 1 + entity_id: !input "entity23" id: current_state_entity23 -##### Button24 Sync - Trigger ##### + ##### Button24 Sync - Trigger "current_state_entity24" ##### - platform: state - entity_id: !input 'entity24' - for: - seconds: 1 + entity_id: !input "entity24" id: current_state_entity24 -##### Button25 Sync - Trigger ##### + ##### Button25 Sync - Trigger "current_state_entity25" ##### - platform: state - entity_id: !input 'entity25' - for: - seconds: 1 + entity_id: !input "entity25" id: current_state_entity25 -##### Button26 Sync - Trigger ##### + ##### Button26 Sync - Trigger "current_state_entity26" ##### - platform: state - entity_id: !input 'entity26' - for: - seconds: 1 + entity_id: !input "entity26" id: current_state_entity26 -##### Button27 Sync - Trigger ##### + ##### Button27 Sync - Trigger "current_state_entity27" ##### - platform: state - entity_id: !input 'entity27' - for: - seconds: 1 + entity_id: !input "entity27" id: current_state_entity27 -##### Button28 Sync - Trigger ##### + ##### Button28 Sync - Trigger "current_state_entity28" ##### - platform: state - entity_id: !input 'entity28' - for: - seconds: 1 + entity_id: !input "entity28" id: current_state_entity28 -##### Button29 Sync - Trigger ##### + ##### Button29 Sync - Trigger "current_state_entity29" ##### - platform: state - entity_id: !input 'entity29' - for: - seconds: 1 + entity_id: !input "entity29" id: current_state_entity29 -##### Button30 Sync - Trigger ##### + ##### Button30 Sync - Trigger "current_state_entity30" ##### - platform: state - entity_id: !input 'entity30' - for: - seconds: 1 + entity_id: !input "entity30" id: current_state_entity30 -##### Button31 Sync - Trigger ##### + ##### Button31 Sync - Trigger "current_state_entity31" ##### - platform: state - entity_id: !input 'entity31' - for: - seconds: 1 + entity_id: !input "entity31" id: current_state_entity31 -##### Button32 Sync - Trigger ##### + ##### Button32 Sync - Trigger "current_state_entity32" ##### - platform: state - entity_id: !input 'entity32' - for: - seconds: 1 + entity_id: !input "entity32" id: current_state_entity32 -##### Button33 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity33' - for: - seconds: 1 - id: current_state_entity33 -##### Button34 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity34' - for: - seconds: 1 - id: current_state_entity34 - -##### Button35 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity35' - for: - seconds: 1 - id: current_state_entity35 - -##### Button36 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity36' - for: - seconds: 1 - id: current_state_entity36 - -##### Button37 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity37' - for: - seconds: 1 - id: current_state_entity37 - -##### Button38 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity38' - for: - seconds: 1 - id: current_state_entity38 - -##### Button39 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity39' - for: - seconds: 1 - id: current_state_entity39 - -##### Button40 Sync - Trigger ##### - - platform: state - entity_id: !input 'entity40' - for: - seconds: 1 - id: current_state_entity40 - -######################################### -# -# ############################################################# ##### CLOSE - Trigger ##### ############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# + + ############################################################# ##### START - Action ##### ############################################################# -# -# -######################################### + action: - variables: -##### Entity - Page Button - Toggle Entity ##### + ##### Entity - Page Button - Toggle Entity ##### entity_short: >- {%- if states(last_click) == "releasebuttonpage01button01" -%} {{ entity01 }} {%- elif states(last_click) == "releasebuttonpage01button02" -%} {{ entity02 }} @@ -965,17 +1263,9 @@ action: {%- elif states(last_click) == "releasebuttonpage04button06" -%} {{ entity30 }} {%- elif states(last_click) == "releasebuttonpage04button07" -%} {{ entity31 }} {%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32 }} - {%- elif states(last_click) == "releasebuttonpage05button01" -%} {{ entity33 }} - {%- elif states(last_click) == "releasebuttonpage05button02" -%} {{ entity34 }} - {%- elif states(last_click) == "releasebuttonpage05button03" -%} {{ entity35 }} - {%- elif states(last_click) == "releasebuttonpage05button04" -%} {{ entity36 }} - {%- elif states(last_click) == "releasebuttonpage05button05" -%} {{ entity37 }} - {%- elif states(last_click) == "releasebuttonpage05button06" -%} {{ entity38 }} - {%- elif states(last_click) == "releasebuttonpage05button07" -%} {{ entity39 }} - {%- elif states(last_click) == "releasebuttonpage05button08" -%} {{ entity40 }} {%- endif -%} -##### Entity - Page Lightsettings ##### + ##### Entity - Page Lightsettings ##### entity_long: >- {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01 }} {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02 }} @@ -1009,17 +1299,45 @@ action: {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ entity30 }} {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ entity31 }} {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32 }} - {%- elif states(last_click) == "pressbuttonpage05button01" -%} {{ entity33 }} - {%- elif states(last_click) == "pressbuttonpage05button02" -%} {{ entity34 }} - {%- elif states(last_click) == "pressbuttonpage05button03" -%} {{ entity35 }} - {%- elif states(last_click) == "pressbuttonpage05button04" -%} {{ entity36 }} - {%- elif states(last_click) == "pressbuttonpage05button05" -%} {{ entity37 }} - {%- elif states(last_click) == "pressbuttonpage05button06" -%} {{ entity38 }} - {%- elif states(last_click) == "pressbuttonpage05button07" -%} {{ entity39 }} - {%- elif states(last_click) == "pressbuttonpage05button08" -%} {{ entity40 }} {%- endif -%} -##### Entity - Page Lightsettings - Skip Back ##### + ##### Entity Name - Page Lightsettings ##### + entity_long_name: >- + {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01_name }} + {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02_name }} + {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ entity03_name }} + {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ entity04_name }} + {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ entity05_name }} + {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ entity06_name }} + {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ entity07_name }} + {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ entity08_name }} + {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ entity09_name }} + {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ entity10_name }} + {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ entity11_name }} + {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ entity12_name }} + {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ entity13_name }} + {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ entity14_name }} + {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ entity15_name }} + {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ entity16_name }} + {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ entity17_name }} + {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ entity18_name }} + {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ entity19_name }} + {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ entity20_name }} + {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ entity21_name }} + {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ entity22_name }} + {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ entity23_name }} + {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ entity24_name }} + {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ entity25_name }} + {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ entity26_name }} + {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ entity27_name }} + {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ entity28_name }} + {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ entity29_name}} + {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ entity30_name }} + {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ entity31_name }} + {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32_name }} + {%- endif -%} + + ##### Entity - Page Lightsettings - Skip Back ##### entity_back: >- {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ "page buttonpage01" }} {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ "page buttonpage01" }} @@ -1053,18 +1371,905 @@ action: {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ "page buttonpage04" }} {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ "page buttonpage04" }} {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ "page buttonpage04" }} - {%- elif states(last_click) == "pressbuttonpage05button01" -%} {{ "page buttonpage05" }} - {%- elif states(last_click) == "pressbuttonpage05button02" -%} {{ "page buttonpage05" }} - {%- elif states(last_click) == "pressbuttonpage05button03" -%} {{ "page buttonpage05" }} - {%- elif states(last_click) == "pressbuttonpage05button04" -%} {{ "page buttonpage05" }} - {%- elif states(last_click) == "pressbuttonpage05button05" -%} {{ "page buttonpage05" }} - {%- elif states(last_click) == "pressbuttonpage05button06" -%} {{ "page buttonpage05" }} - {%- elif states(last_click) == "pressbuttonpage05button07" -%} {{ "page buttonpage05" }} - {%- elif states(last_click) == "pressbuttonpage05button08" -%} {{ "page buttonpage05" }} {%- endif -%} -##### Page Button - SHORT Press - Toggle ##### + ######################################################################################################################## + + # main - alias: "choose alias (name) - NEW VERSION" - choose: + + ##### NSPanel boot init ##### DONE + - conditions: + - condition: trigger + id: nspanel_boot_init + sequence: + + ##### NSPanel boot init start ##### + - delay: + milliseconds: 100 + - service: "{{ command_text_printf }}" + data: + component: home.loading + message: "Loading - PLS WAIT!" + + ##### NSPanel boot init language ##### + - delay: + milliseconds: "{{ delay_value }}" + - choose: + ##### NSPanel boot init language DE ##### DONE + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ####### Date ##### + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather01.a02 + message: "{{ date01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather02.a02 + message: "{{ date02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather03.a02 + message: "{{ date03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather04.a02 + message: "{{ date04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather05.a02 + message: "{{ date05_de }}" + + ##### NSPanel boot init language EN ##### DONE + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Date ##### + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date01_en }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather01.a02 + message: "{{ date01_en }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather02.a02 + message: "{{ date02_en }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather03.a02 + message: "{{ date03_en }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather04.a02 + message: "{{ date04_en }}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: weather05.a02 + message: "{{ date05_de }}" + + ##### NSPanel boot init buttons ##### + - delay: + milliseconds: "{{ delay_value }}" + - repeat: + for_each: + - entity: "{{ entity01 }}" + button_label: "{{ entity01_name }}" + button: buttonpage01.button01 + - entity: "{{ entity02 }}" + button_label: "{{ entity02_name }}" + button: buttonpage01.button02 + - entity: "{{ entity03 }}" + button_label: "{{ entity03_name }}" + button: buttonpage01.button03 + - entity: "{{ entity04 }}" + button_label: "{{ entity04_name }}" + button: buttonpage01.button04 + - entity: "{{ entity05 }}" + button_label: "{{ entity05_name }}" + button: buttonpage01.button05 + - entity: "{{ entity06 }}" + button_label: "{{ entity06_name }}" + button: buttonpage01.button06 + - entity: "{{ entity07 }}" + button_label: "{{ entity07_name }}" + button: buttonpage01.button07 + - entity: "{{ entity08 }}" + button_label: "{{ entity08_name }}" + button: buttonpage01.button08 + - entity: "{{ entity09 }}" + button_label: "{{ entity09_name }}" + button: buttonpage02.button01 + - entity: "{{ entity10 }}" + button_label: "{{ entity10_name }}" + button: buttonpage02.button02 + - entity: "{{ entity11 }}" + button_label: "{{ entity11_name }}" + button: buttonpage02.button03 + - entity: "{{ entity12 }}" + button_label: "{{ entity12_name }}" + button: buttonpage02.button04 + - entity: "{{ entity13 }}" + button_label: "{{ entity13_name }}" + button: buttonpage02.button05 + - entity: "{{ entity14 }}" + button_label: "{{ entity14_name }}" + button: buttonpage02.button06 + - entity: "{{ entity15 }}" + button_label: "{{ entity15_name }}" + button: buttonpage02.button07 + - entity: "{{ entity16 }}" + button_label: "{{ entity16_name }}" + button: buttonpage02.button08 + - entity: "{{ entity17 }}" + button_label: "{{ entity17_name }}" + button: buttonpage03.button01 + - entity: "{{ entity18 }}" + button_label: "{{ entity18_name }}" + button: buttonpage03.button02 + - entity: "{{ entity19 }}" + button_label: "{{ entity19_name }}" + button: buttonpage03.button03 + - entity: "{{ entity20 }}" + button_label: "{{ entity20_name }}" + button: buttonpage03.button04 + - entity: "{{ entity21 }}" + button_label: "{{ entity21_name }}" + button: buttonpage03.button05 + - entity: "{{ entity22 }}" + button_label: "{{ entity22_name }}" + button: buttonpage03.button06 + - entity: "{{ entity23 }}" + button_label: "{{ entity23_name }}" + button: buttonpage03.button07 + - entity: "{{ entity24 }}" + button_label: "{{ entity24_name }}" + button: buttonpage03.button08 + - entity: "{{ entity25 }}" + button_label: "{{ entity17_name }}" + button: buttonpage04.button01 + - entity: "{{ entity26 }}" + button_label: "{{ entity26_name }}" + button: buttonpage04.button02 + - entity: "{{ entity27 }}" + button_label: "{{ entity27_name }}" + button: buttonpage04.button03 + - entity: "{{ entity28 }}" + button_label: "{{ entity28_name }}" + button: buttonpage04.button04 + - entity: "{{ entity29 }}" + button_label: "{{ entity29_name }}" + button: buttonpage04.button05 + - entity: "{{ entity30 }}" + button_label: "{{ entity30_name }}" + button: buttonpage04.button06 + - entity: "{{ entity31 }}" + button_label: "{{ entity31_name }}" + button: buttonpage04.button07 + - entity: "{{ entity32 }}" + button_label: "{{ entity32_name }}" + button: buttonpage04.button08 + sequence: + - if: + - condition: template + value_template: '{{ repeat.item.entity|length > 0 }}' + then: + - variables: + component_to_update: "{{ repeat.item.button }}" + # Button PIC + btn_pic: >- + {%- if repeat.item.entity is match "light." and states[repeat.item.entity].state == 'on' -%} {{ button_light_on }} + {%- elif repeat.item.entity is match "light." and states[repeat.item.entity].state == 'off' -%} {{ button_light_off }} + {%- elif repeat.item.entity is match "switch." and states[repeat.item.entity].state == 'on' -%} {{ button_switch_on }} + {%- elif repeat.item.entity is match "switch." and states[repeat.item.entity].state == 'off' -%} {{ button_switch_off }} + {%- elif repeat.item.entity is match "input_boolean." and states[repeat.item.entity].state == 'on' -%} {{ button_switch_on }} + {%- elif repeat.item.entity is match "input_boolean." and states[repeat.item.entity].state == 'off' -%} {{ button_switch_off }} + {%- elif repeat.item.entity is match "cover." and states[repeat.item.entity].state == 'open' -%} {{ button_cover_on }} + {%- elif repeat.item.entity is match "cover." and states[repeat.item.entity].state == 'closed' -%} {{ button_cover_off }} + {%- endif -%} + # TEXT and BRIGHTNESS Background + btn_bg: >- + {%- if states[repeat.item.entity].state == 'on' or states[repeat.item.entity].state == 'open' -%} {{ button_color_1 }} + {%- elif states[repeat.item.entity].state == 'off' or states[repeat.item.entity].state == 'closed' -%} {{ button_color_2 }} + {%- endif -%} + # TEXT Font + btn_txt_font: >- + {%- if states[repeat.item.entity].state == 'on' or states[repeat.item.entity].state == 'open' -%} {{ button_color_2 }} + {%- elif states[repeat.item.entity].state == 'off' or states[repeat.item.entity].state == 'closed' -%} {{ button_color_1 }} + {%- endif -%} + # BRIGHTNESS Font + btn_bri_font: "{{ button_color_2 }}" + # BTN Label + btn_label: "{{ repeat.item.button_label }}" + btn_bri_txt: >- + {%- if repeat.item.entity is match "light." and states(repeat.item.entity) == 'on' and state_attr(repeat.item.entity, "brightness") != None -%} {{ (state_attr(repeat.item.entity, "brightness") | int * 100 /255) | round(0) }}% + {%- elif repeat.item.entity is match "cover." and states(repeat.item.entity) == 'open' and state_attr(repeat.item.entity, "current_position") != None -%} {{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}% + {%- else -%} 0 + {%- endif -%} + + ##### SET Buttons #### + # + ##### Button PIC ##### + - service: "{{ command_printf }}" + data: + cmd: "{{ component_to_update }}pic.pic={{ btn_pic }}" + ##### TEXT Background ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_background_color }}" + data: + component: "{{ component_to_update }}text" + message: "{{ btn_bg }}" + ##### TEXT Font Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_font_color }}" + data: + component: "{{ component_to_update }}text" + message: "{{ btn_txt_font }}" + ##### BRIGHTNESS Background Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_background_color }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bg }}" + ##### BRIGHTNESS Font Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_font_color }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bri_font }}" + ##### "TEXT" Label ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}text" + message: "{{ btn_label }}" + ##### "BRIGHTNESS" Text ##### + - delay: + milliseconds: "{{ delay_value }}" + - if: + - condition: template + value_template: "{{ btn_bri_txt == 0 }}" + then: + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}bri" + message: " " + else: + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bri_txt }}" + + ##### NSPanel boot init - Time ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a01 + message: "{{ time }}" + + ##### NSPanel boot init - Humidity ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a04 + message: "{{ states(humidity) |round(0) }}%" + + ##### NSPanel boot init - Hotwater ##### + - if: + - condition: template + value_template: '{{ hotwatertemp is match "sensor." }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.p01.pic=68 + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a07 + message: "{{ states(hotwatertemp) |round(1) }}°" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a08 + message: "{{ states(hotwatertemp) |round(1) }}°" + + ##### NSPanel boot init - Outdoor Temp ##### + - choose: + ##### Outdoor Temp Entity ##### + - conditions: + - condition: template + value_template: '{{ outdoortemp is match "sensor." }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: "{{ states(outdoortemp) |round(0) }}°" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: "{{ states(outdoortemp) |round(0) }}°" + + ##### Outdoor Temp Default ##### + - conditions: + - condition: template + value_template: '{{ outdoortemp != "sensor." and weather == "Default" }}' + sequence: + ##### Outdoor Temp Default ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + + ##### Outdoor TempAccuweather ##### + - conditions: + - condition: template + value_template: '{{ outdoortemp != "sensor." and weather == "AccuWeather" }}' + sequence: + ### Outdoor TempAccuweather + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + + ##### Weather Icon Home Page + - choose: + ##### Weather PIC - DEFAULT HA ##### + - conditions: + - condition: template + value_template: '{{ weather == "Default" }}' + sequence: + - variables: + # weather PIC + weather_pic: >- + {%- if states(ha_weather) == 'sunny' -%} {{ weather_sunny }} + {%- elif states(ha_weather) == 'cloudy' -%} {{ weather_cloudy }} + {%- elif states(ha_weather) == 'rainy' -%} {{ weather_rainy }} + {%- elif states(ha_weather) == 'pouring' -%} {{ weather_pouring }} + {%- elif states(ha_weather) == 'snowy' -%} {{ weather_snowy }} + {%- elif states(ha_weather) == 'hail' -%} {{ weather_hail }} + {%- elif states(ha_weather) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif states(ha_weather) == 'fog' -%} {{ weather_fog }} + {%- elif states(ha_weather) == 'windy' -%} {{ weather_windy }} + {%- elif states(ha_weather) == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif states(ha_weather) == 'lightning' -%} {{ weather_lightning }} + {%- elif states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} + {%- elif states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} + {%- elif states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} + {%- elif states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} + {%- elif states(ha_weather) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} + {%- elif states(ha_weather) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} + {%- elif states(ha_weather) == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic={{ weather_pic }} + + ##### Weather PIC - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ weather == "AccuWeather" }}' + sequence: + - variables: + # weather PIC + weather_pic: >- + {%- if states(accuweather_value) == 'sunny' -%} {{ weather_sunny }} + {%- elif states(accuweather_value) == 'cloudy' -%} {{ weather_cloudy }} + {%- elif states(accuweather_value) == 'rainy' -%} {{ weather_rainy }} + {%- elif states(accuweather_value) == 'pouring' -%} {{ weather_pouring }} + {%- elif states(accuweather_value) == 'snowy' -%} {{ weather_snowy }} + {%- elif states(accuweather_value) == 'hail' -%} {{ weather_hail }} + {%- elif states(accuweather_value) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif states(accuweather_value) == 'fog' -%} {{ weather_fog }} + {%- elif states(accuweather_value) == 'windy' -%} {{ weather_windy }} + {%- elif states(accuweather_value) == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif states(accuweather_value) == 'lightning' -%} {{ weather_lightning }} + {%- elif states(accuweather_value) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} + {%- elif states(accuweather_value) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} + {%- elif states(accuweather_value) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} + {%- elif states(accuweather_value) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} + {%- elif states(accuweather_value) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} + {%- elif states(accuweather_value) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} + {%- elif states(accuweather_value) == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic={{ weather_pic }} + + ##### NSPanel boot init finished ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.loading + message: " " + + + #### TFT Upload Automation ##### DONE + - conditions: + - condition: trigger + id: tft_upload + sequence: + - delay: + seconds: 2 + - service: "{{ tft_upload }}" + data: {} + + + + ##### Update Button Page and Lightsettings / Coversettings Page ##### DONE + - conditions: + - condition: trigger + id: + - current_state_entity01 + - current_state_entity02 + - current_state_entity03 + - current_state_entity04 + - current_state_entity05 + - current_state_entity06 + - current_state_entity07 + - current_state_entity08 + - current_state_entity09 + - current_state_entity10 + - current_state_entity11 + - current_state_entity12 + - current_state_entity13 + - current_state_entity14 + - current_state_entity15 + - current_state_entity16 + - current_state_entity17 + - current_state_entity18 + - current_state_entity19 + - current_state_entity20 + - current_state_entity21 + - current_state_entity22 + - current_state_entity23 + - current_state_entity24 + - current_state_entity25 + - current_state_entity26 + - current_state_entity27 + - current_state_entity28 + - current_state_entity29 + - current_state_entity30 + - current_state_entity31 + - current_state_entity32 + sequence: + - alias: "Set variable(s) for entity change" + variables: + component_to_update: >- + {%- if trigger.entity_id == entity01 -%} buttonpage01.button01 + {%- elif trigger.entity_id == entity02 -%} buttonpage01.button02 + {%- elif trigger.entity_id == entity03 -%} buttonpage01.button03 + {%- elif trigger.entity_id == entity04 -%} buttonpage01.button04 + {%- elif trigger.entity_id == entity05 -%} buttonpage01.button05 + {%- elif trigger.entity_id == entity06 -%} buttonpage01.button06 + {%- elif trigger.entity_id == entity07 -%} buttonpage01.button07 + {%- elif trigger.entity_id == entity08 -%} buttonpage01.button08 + {%- elif trigger.entity_id == entity09 -%} buttonpage02.button01 + {%- elif trigger.entity_id == entity10 -%} buttonpage02.button02 + {%- elif trigger.entity_id == entity11 -%} buttonpage02.button03 + {%- elif trigger.entity_id == entity12 -%} buttonpage02.button04 + {%- elif trigger.entity_id == entity13 -%} buttonpage02.button05 + {%- elif trigger.entity_id == entity14 -%} buttonpage02.button06 + {%- elif trigger.entity_id == entity15 -%} buttonpage02.button07 + {%- elif trigger.entity_id == entity16 -%} buttonpage02.button08 + {%- elif trigger.entity_id == entity17 -%} buttonpage03.button01 + {%- elif trigger.entity_id == entity18 -%} buttonpage03.button02 + {%- elif trigger.entity_id == entity19 -%} buttonpage03.button03 + {%- elif trigger.entity_id == entity20 -%} buttonpage03.button04 + {%- elif trigger.entity_id == entity21 -%} buttonpage03.button05 + {%- elif trigger.entity_id == entity22 -%} buttonpage03.button06 + {%- elif trigger.entity_id == entity23 -%} buttonpage03.button07 + {%- elif trigger.entity_id == entity24 -%} buttonpage03.button08 + {%- elif trigger.entity_id == entity25 -%} buttonpage04.button01 + {%- elif trigger.entity_id == entity26 -%} buttonpage04.button02 + {%- elif trigger.entity_id == entity27 -%} buttonpage04.button03 + {%- elif trigger.entity_id == entity28 -%} buttonpage04.button04 + {%- elif trigger.entity_id == entity29 -%} buttonpage04.button05 + {%- elif trigger.entity_id == entity30 -%} buttonpage04.button06 + {%- elif trigger.entity_id == entity31 -%} buttonpage04.button07 + {%- elif trigger.entity_id == entity32 -%} buttonpage04.button08 + {%- endif -%} + # Button PIC + btn_pic: >- + {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' -%} {{ button_light_on }} + {%- elif trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'off' -%} {{ button_light_off }} + {%- elif trigger.to_state.entity_id is match "switch." and trigger.to_state.state == 'on' -%} {{ button_switch_on }} + {%- elif trigger.to_state.entity_id is match "switch." and trigger.to_state.state == 'off' -%} {{ button_switch_off }} + {%- elif trigger.to_state.entity_id is match "input_boolean." and trigger.to_state.state == 'on' -%} {{ button_switch_on }} + {%- elif trigger.to_state.entity_id is match "input_boolean." and trigger.to_state.state == 'off' -%} {{ button_switch_off }} + {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' -%} {{ button_cover_on }} + {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'closed' -%} {{ button_cover_off }} + {%- endif -%} + # TEXT and BRIGHTNESS Background + btn_bg: >- + {%- if trigger.to_state.state == 'on' or trigger.to_state.state == 'open' -%} {{ button_color_1 }} + {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_2 }} + {%- endif -%} + # TEXT Font + btn_txt_font: >- + {%- if trigger.to_state.state == 'on' or trigger.to_state.state == 'open' -%} {{ button_color_2 }} + {%- elif trigger.to_state.state == 'off' or trigger.to_state.state == 'closed' -%} {{ button_color_1 }} + {%- endif -%} + # BRIGHTNESS Font + btn_bri_font: "{{ button_color_2 }}" + # BTN Label + btn_label: >- + {%- if trigger.entity_id == entity01 -%} {{ entity01_name }} + {%- elif trigger.entity_id == entity02 -%} {{ entity02_name }} + {%- elif trigger.entity_id == entity03 -%} {{ entity03_name }} + {%- elif trigger.entity_id == entity04 -%} {{ entity04_name }} + {%- elif trigger.entity_id == entity05 -%} {{ entity05_name }} + {%- elif trigger.entity_id == entity06 -%} {{ entity06_name }} + {%- elif trigger.entity_id == entity07 -%} {{ entity07_name }} + {%- elif trigger.entity_id == entity08 -%} {{ entity08_name }} + {%- elif trigger.entity_id == entity09 -%} {{ entity09_name }} + {%- elif trigger.entity_id == entity10 -%} {{ entity10_name }} + {%- elif trigger.entity_id == entity11 -%} {{ entity11_name }} + {%- elif trigger.entity_id == entity12 -%} {{ entity12_name }} + {%- elif trigger.entity_id == entity13 -%} {{ entity13_name }} + {%- elif trigger.entity_id == entity14 -%} {{ entity14_name }} + {%- elif trigger.entity_id == entity15 -%} {{ entity15_name }} + {%- elif trigger.entity_id == entity16 -%} {{ entity16_name }} + {%- elif trigger.entity_id == entity17 -%} {{ entity17_name }} + {%- elif trigger.entity_id == entity18 -%} {{ entity18_name }} + {%- elif trigger.entity_id == entity19 -%} {{ entity19_name }} + {%- elif trigger.entity_id == entity20 -%} {{ entity20_name }} + {%- elif trigger.entity_id == entity21 -%} {{ entity21_name }} + {%- elif trigger.entity_id == entity22 -%} {{ entity22_name }} + {%- elif trigger.entity_id == entity23 -%} {{ entity23_name }} + {%- elif trigger.entity_id == entity24 -%} {{ entity24_name }} + {%- elif trigger.entity_id == entity25 -%} {{ entity25_name }} + {%- elif trigger.entity_id == entity26 -%} {{ entity26_name }} + {%- elif trigger.entity_id == entity27 -%} {{ entity27_name }} + {%- elif trigger.entity_id == entity28 -%} {{ entity28_name }} + {%- elif trigger.entity_id == entity29 -%} {{ entity29_name }} + {%- elif trigger.entity_id == entity30 -%} {{ entity30_name }} + {%- elif trigger.entity_id == entity31 -%} {{ entity31_name }} + {%- elif trigger.entity_id == entity32 -%} {{ entity32_name }} + {%- endif -%} + btn_bri_txt: >- + {%- if trigger.to_state.entity_id is match "light." and trigger.to_state.state == 'on' and trigger.to_state.attributes.brightness is defined -%} {{ (trigger.to_state.attributes.brightness | int * 100 /255) | round(0) }}% + {%- elif trigger.to_state.entity_id is match "cover." and trigger.to_state.state == 'open' and trigger.to_state.attributes.current_position is defined -%} {{ (trigger.to_state.attributes.current_position | int) | round(0) }}% + {%- else -%} 0 + {%- endif -%} + + ##### Button PIC ##### + - service: "{{ command_printf }}" + data: + cmd: "{{ component_to_update }}pic.pic={{ btn_pic }}" + + ##### TEXT Background ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_background_color }}" + data: + component: "{{ component_to_update }}text" + message: "{{ btn_bg }}" + + ##### TEXT Font Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_font_color }}" + data: + component: "{{ component_to_update }}text" + message: "{{ btn_txt_font }}" + + ##### BRIGHTNESS Background Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_background_color }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bg }}" + + ##### BRIGHTNESS Font Color ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_font_color }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bri_font }}" + + ##### "TEXT" Label ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}text" + message: "{{ btn_label }}" + + ##### "BRIGHTNESS" Text ##### + - if: + - condition: template + value_template: "{{ btn_bri_txt == 0 }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}bri" + message: " " + else: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: "{{ component_to_update }}bri" + message: "{{ btn_bri_txt }}" + + ##### UPDATE LIGHTSETTING / COVERSETTING PAGE + - choose: + ##### LIGHTSETTINGS PAGE - LIGHT Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "light." }}' + sequence: + - choose: + ##### LIGHT ON / OFF + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "on" }}' + sequence: + ##### LIGHT PIC - ON ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_on }} + + ##### LIGHT Brightness Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' + + ##### LIGHT Temp Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.tempslider + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + ##### LIGHT Brightness Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }}%' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }}%' + + ##### LIGHT Temp Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + ##### LIGHT - OFF ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "off" }}' + sequence: + ##### LIGHT PIC - OFF ##### + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_off }} + + ##### LIGHT Brightness Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '0' + + ##### LIGHT Brightness Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '0 %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '0 %' + + ##### COVERSETTINGS PAGE - COVER Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "cover." }}' + sequence: + ##### COVER OPEN ##### + - choose: + ##### Cover PIC - OPEN ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "open" }}' + sequence: + ##### COVER PIC - OPEN + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_open }} + + ##### Cover Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' + + ##### Cover Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' + + ##### Cover - Closed ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "closed" }}' + sequence: + ##### COVER PIC - CLOSED + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_closed }} + + ##### Cover Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '0' + + ##### Cover Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '0 %' + + + + ##### Page Button - SHORT Press - Toggle Enities ##### DONE - conditions: - condition: trigger id: short_press @@ -1080,2262 +2285,1965 @@ action: input_boolean.toggle {% endif %} data: - entity_id: '{{ entity_short }}' + 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: + ##### Page Button - LONG Press - JUMP to Page Lightsettings / Coversettings ##### DONE - conditions: - condition: trigger - id: tft_upload + id: long_press sequence: + - choose: + ##### LONG Press - LIGHT Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "light." }}' + sequence: + ##### LIGHT Generel Values ##### + - service: "{{ command_printf }}" + data: + cmd: page lightsettings + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_name + message: '{{ entity_long_name }}' + - delay: + milliseconds: "{{ delay_value }}" + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'brightness') != none }}" + then: + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (state_attr(entity_long, "brightness") | int * 100 /255) | round(0) }}%' + else: + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '0' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '0 %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '0 %' + + ##### LIGHT Check Color_Temp Value is available when yes send some current Values ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'color_temp') != none }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: lightsettings.tempslider + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + ##### LIGHT ON / OFF ##### + - choose: + ##### LIGHT PIC - ON ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "on" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_on }} + + ##### LIGHT PIC - OFF ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "off" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_off }} + + ##### LONG Press - COVER Entity ##### + - conditions: + - condition: template + value_template: '{{ entity_long is match "cover." }}' + sequence: + ##### COVER Generel Values ##### + - service: "{{ command_printf }}" + data: + cmd: page coversettings + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_name + message: '{{ entity_long_name }}' + + ##### COVER Battery ICON Yes / NO ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'battery') != none }}" + then: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.battery_value + message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.battery_icon.pic={{ battery_icon }} + + ##### COVER OPEN / CLOSE + - choose: + ##### COVER PIC - open ##### + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "open" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_open }} + + ##### COVER PIC - Closed + - conditions: + - condition: template + value_template: '{{ states(entity_long) == "closed" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_closed }} + + + + ##### LAST_CLICK_LIGHTSETTINGS - Changes on page Light-Settings ##### DONE + - conditions: + - condition: trigger + id: light_settings + sequence: + - choose: + ##### Page Lightsettings - Brightness Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "brightness\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + brightness: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (states(last_click_lightsettings) |replace("brightness","") | int * 100 /255) |round(0) }}%' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (states(last_click_lightsettings) |replace("brightness","") | int * 100 /255) |round(0) }}%' + + ##### Page Lightsettings - color_Temp Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "colortemp\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + color_temp: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + + ##### Page Lightsettings - Color RGB Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "\d+,\d+,\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + rgb_color: '{{ states(last_click_lightsettings).split(",") }}' + + ##### Page Lightsettings - Close Lightsetting Page ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_lightsettings) == "releaselightsettingsclose" }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "{{ entity_back }}" + + + + ##### LAST_CLICK_COVERSETTINGS - Changes on page Cover-Settings ##### DONE + - conditions: + - condition: trigger + id: cover_settings + sequence: + - choose: + ##### Page Coversettings - Cover Slider MOVE ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) is match "coverposition\d+" }}' + sequence: + - service: cover.set_cover_position + data: + entity_id: "{{ entity_long }}" + position: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value_2 + message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' + + ##### Page Coversettings - Cover CLOSE Button ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_close_press" }}' + sequence: + - service: cover.close_cover + data: + entity_id: "{{ entity_long }}" + + ##### Page Coversettings - Cover OPEN Button ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_open_press" }}' + sequence: + - service: cover.open_cover + data: + entity_id: "{{ entity_long }}" + + ##### Page Coversettings - Cover STOP Button ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_stop_press" }}' + sequence: + - service: cover.stop_cover + data: + entity_id: "{{ entity_long }}" + + ##### Page Coversettings - Close Coversettings Page ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_coversettings) == "releasecoversettingsclose" }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "{{ entity_back }}" + + + ##### Left button press ##### DONE + - conditions: + - condition: trigger + id: left_button_press + sequence: + - service: >- + {% if left_button_entity is match 'light.' %} + light.toggle + {% elif left_button_entity is match 'switch.' %} + switch.toggle + {% elif left_button_entity is match 'cover.' %} + cover.toggle + {% elif left_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% endif %} + data: + entity_id: "{{ left_button_entity }}" + + + + ##### Right button press ##### DONE + - conditions: + - condition: trigger + id: right_button_press + sequence: + - service: >- + {% if right_button_entity is match 'light.' %} + light.toggle + {% elif right_button_entity is match 'switch.' %} + switch.toggle + {% elif right_button_entity is match 'cover.' %} + cover.toggle + {% elif right_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% endif %} + data: + entity_id: "{{ right_button_entity }}" + + + + ##### Date and Time Home Page ##### DONE + - conditions: + - condition: trigger + id: time_state + sequence: + ##### Time Home Page ##### + - service: "{{ command_text_printf }}" + data: + component: home.a01 + message: "{{ time }}" + + - choose: + ##### Date Home Page + Forcast DE ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date01_de }}" + + ##### Date Home Page + Forcast EN ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date0_en }}" + + + + ##### Humidity ##### DONE + - conditions: + - condition: trigger + id: humidity_state + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a04 + message: "{{ states(humidity) |round(0) }}%" + + + + ##### Hotwater Temp ##### DONE + - conditions: + - condition: trigger + id: hotwatertemp_state + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a07 + message: "{{ states(hotwatertemp) |round(1) }}°" - delay: - seconds: 2 - - service: esphome.nspanel_buero_upload_tft - data: {} + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a08 + message: "{{ states(hotwatertemp) |round(1) }}°" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: home.p01.pic=68 + + + + ##### Outdoor Temp Entity ##### DONE + - conditions: + - condition: trigger + id: outdoortemp_state + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: "{{ states(outdoortemp) |round(0) }}°" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: "{{ states(outdoortemp) |round(0) }}°" + + + ##### Outdoor Temp Weather Integration ##### DONE + - conditions: + - condition: trigger + id: weather_temp_time + sequence: + - choose: + - conditions: + ##### Outdoor Temp Default ##### + - condition: template + value_template: '{{ outdoortemp != "sensor." and weather == "Default" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + + ##### Outdoor Temp Accuweather ##### + - conditions: + - condition: template + value_template: '{{ outdoortemp != "sensor." and weather == "AccuWeather" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + + + + ##### Weather Forcast ##### + - conditions: + - condition: trigger + id: weather_settings + sequence: + - choose: + ##### Weather - DEFAULT HA ##### + - conditions: + - condition: template + value_template: '{{ weather == "Default" }}' + sequence: + - choose: + ##### Weather Page - 01 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather01" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if states(ha_weather) == 'sunny' -%} {{ weather_sunny }} + {%- elif states(ha_weather) == 'cloudy' -%} {{ weather_cloudy }} + {%- elif states(ha_weather) == 'rainy' -%} {{ weather_rainy }} + {%- elif states(ha_weather) == 'pouring' -%} {{ weather_pouring }} + {%- elif states(ha_weather) == 'snowy' -%} {{ weather_snowy }} + {%- elif states(ha_weather) == 'hail' -%} {{ weather_hail }} + {%- elif states(ha_weather) == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif states(ha_weather) == 'fog' -%} {{ weather_fog }} + {%- elif states(ha_weather) == 'windy' -%} {{ weather_windy }} + {%- elif states(ha_weather) == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif states(ha_weather) == 'lightning' -%} {{ weather_lightning }} + {%- elif states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'above_horizon' -%} {{ weather_partlycloudy_day }} + {%- elif states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'below_horizon' -%} {{ weather_partlycloudy_night }} + {%- elif states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'above_horizon' -%} {{ weather_lightning_rainy_day }} + {%- elif states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'below_horizon' -%} {{ weather_lightning_rainy_night }} + {%- elif states(ha_weather) == 'execptional' and states('sun.sun') == 'above_horizon' -%} {{ weather_execptional_day }} + {%- elif states(ha_weather) == 'execptional' and states('sun.sun') == 'below_horizon' -%} {{ weather_execptional_night }} + {%- elif states(ha_weather) == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather01.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather01.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + + ##### field 2 ##### + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value03 + message: '{{state_attr(ha_weather,"wind_speed") | round(0)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather Page - 02 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather02" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(ha_weather,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(ha_weather,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### 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(ha_weather,"forecast")[0].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather02.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[0].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value02 + message: '{{state_attr(ha_weather,"forecast")[0].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value03 + message: '{{state_attr(ha_weather,"forecast")[0].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather Page - 03 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather03" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(ha_weather,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(ha_weather,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### 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(ha_weather,"forecast")[1].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather03.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[1].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value02 + message: '{{state_attr(ha_weather,"forecast")[1].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value03 + message: '{{state_attr(ha_weather,"forecast")[1].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather Page - 04 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather04" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(ha_weather,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(ha_weather,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather04.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_min ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[2].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[2].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value02 + message: '{{state_attr(ha_weather,"forecast")[2].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value03 + message: '{{state_attr(ha_weather,"forecast")[2].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather Page - 05 - HA DEFAULT ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather05" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(ha_weather,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(ha_weather,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather05.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_min ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[3].templow | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_max ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[3].temperature | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value02 + message: '{{state_attr(ha_weather,"forecast")[3].precipitation| round(1)}} mm' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value02_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value03 + message: '{{state_attr(ha_weather,"forecast")[3].wind_speed | round(1)}} km/h' + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value03_pic.pic={{ weather_icon_wind }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + + ##### field 5 ##### + + ##### Weather - Accuweather ##### + - conditions: + - condition: template + value_template: '{{ weather == "AccuWeather" }}' + sequence: + - choose: + ##### Weather Page - 01 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather01" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(accuweather_value,"forecast")[0].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(accuweather_value,"forecast")[0].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather01.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather01.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_0d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather01.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.day + message: "{{ day01_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.date + message: "{{ date01_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value01 + message: "{{ state_attr(accuweather_value,'forecast')[0].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value02 + message: "{{states(accuweather_hours_of_sun_0d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value03 + message: "{{state_attr(accuweather_uv_index_0d, 'level')}} {{states(accuweather_uv_index_0d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value04 + message: "{{states(accuweather_thunderstorm_probability_day_0d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.value05 + message: "{{states(accuweather_wind_day_0d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather01.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 02 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather02" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(accuweather_value,"forecast")[1].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(accuweather_value,"forecast")[1].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather02.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather02.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_1d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather02.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_1d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.day + message: "{{ day02_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.date + message: "{{ date02_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value01 + message: "{{ state_attr(accuweather_value,'forecast')[1].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value02 + message: "{{states(accuweather_hours_of_sun_1d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value03 + message: "{{state_attr(accuweather_uv_index_1d, 'level')}} {{states(accuweather_uv_index_1d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value04 + message: "{{states(accuweather_thunderstorm_probability_day_1d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.value05 + message: "{{states(accuweather_wind_day_1d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather02.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 03 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather03" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(accuweather_value,"forecast")[2].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(accuweather_value,"forecast")[2].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather03.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather03.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_2d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather03.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_2d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.day + message: "{{ day03_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.date + message: "{{ date03_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value01 + message: "{{ state_attr(accuweather_value,'forecast')[2].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value02 + message: "{{states(accuweather_hours_of_sun_2d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value03 + message: "{{state_attr(accuweather_uv_index_2d, 'level')}} {{states(accuweather_uv_index_2d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value04 + message: "{{states(accuweather_thunderstorm_probability_day_2d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.value05 + message: "{{states(accuweather_wind_day_2d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather03.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 04 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather04" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(accuweather_value,"forecast")[3].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(accuweather_value,"forecast")[3].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather04.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_3d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather04.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_3d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.day + message: "{{ day04_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.date + message: "{{ date04_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value01 + message: "{{ state_attr(accuweather_value,'forecast')[3].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value02 + message: "{{states(accuweather_hours_of_sun_3d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value03 + message: "{{state_attr(accuweather_uv_index_3d, 'level')}} {{states(accuweather_uv_index_3d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value04 + message: "{{states(accuweather_thunderstorm_probability_day_3d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.value05 + message: "{{states(accuweather_wind_day_3d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather04.value05_pic.pic={{ weather_icon_wind }} + + ##### Weather Page - 05 - ACCUWEATHER ##### + - conditions: + - condition: template + value_template: '{{ states(last_click_weathersettings) == "weather05" }}' + sequence: + - variables: + # weather PIC + weather_icon: >- + {%- if state_attr(accuweather_value,"forecast")[4].condition == 'sunny' -%} {{ weather_sunny }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'cloudy' -%} {{ weather_cloudy }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'rainy' -%} {{ weather_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'pouring' -%} {{ weather_pouring }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'snowy' -%} {{ weather_snowy }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'hail' -%} {{ weather_hail }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'snowy-rainy' -%} {{ weather_snowy_rainy }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'fog' -%} {{ weather_fog }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'windy' -%} {{ weather_windy }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'windy-variant' -%} {{ weather_windy-variant }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'lightning' -%} {{ weather_lightning }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'partlycloudy' -%} {{ weather_partlycloudy_day }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'lightning-rainy' -%} {{ weather_lightning_rainy_day }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'execptional' -%} {{ weather_execptional_day }} + {%- elif state_attr(accuweather_value,"forecast")[4].condition == 'clear-night' -%} {{ weather_clear_night }} + {%- endif -%} + + ##### SET weather PIC on Home Page #### + - service: "{{ command_printf }}" + data: + cmd: weather05.weather_icon.pic={{ weather_icon }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MIN #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_min ### Temperature MIN ### + message: '{{states(accuweather_realfeel_temperature_min_4d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### Slash ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.slash + message: '/' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET TEMP MAX #### + - service: "{{ command_text_printf }}" + data: + component: weather05.temp_max ### Temperature MAX ### + message: '{{states(accuweather_realfeel_temperature_max_4d) | round(0)}}°' + - delay: + milliseconds: "{{ delay_value }}" + + ##### SET Language DE / EN ##### + - choose: + ##### Language DE for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Language EN for Day Name and Date ##### + - conditions: + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + ##### Day Name ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.day + message: "{{ day05_de }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### Day Date ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.date + message: "{{ date05_en }}" + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value01 + message: "{{ state_attr(accuweather_value,'forecast')[4].precipitation_probability}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value01_pic.pic={{ weather_icon_rain }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value02 + message: "{{states(accuweather_hours_of_sun_4d) | round(0)}} h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value02_pic.pic={{ weather_icon_sun }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value03 + message: "{{state_attr(accuweather_uv_index_4d, 'level')}} {{states(accuweather_uv_index_4d) | round(0)}}" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value03_pic.pic={{ weather_icon_protect }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value04 + message: "{{states(accuweather_thunderstorm_probability_day_4d) | round(0)}} %" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value04_pic.pic={{ weather_icon_lightning }} + - delay: + milliseconds: "{{ delay_value }}" + + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.value05 + message: "{{states(accuweather_wind_day_4d) | round(0)}} km/h" + - delay: + milliseconds: "{{ delay_value }}" + - service: "{{ command_printf }}" + data: + cmd: weather05.value05_pic.pic={{ weather_icon_wind }} -######################################### -# -# ############################################################# -##### CLOSE - 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 - -##### Button04 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity04 - - condition: state - entity_id: !input entity04 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button04 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity04 - - condition: state - entity_id: !input entity04 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button04 - message: 0 - -##### Button05 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity05 - - condition: state - entity_id: !input entity05 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button05 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity05 - - condition: state - entity_id: !input entity05 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button05 - message: 0 - -##### Button06 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity06 - - condition: state - entity_id: !input entity06 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button06 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity06 - - condition: state - entity_id: !input entity06 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button06 - message: 0 - -##### Button07 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity07 - - condition: state - entity_id: !input entity07 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button07 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity07 - - condition: state - entity_id: !input entity07 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button07 - message: 0 - -##### Button08 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity08 - - condition: state - entity_id: !input entity08 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage01.button08 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity08 - - condition: state - entity_id: !input entity08 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage01.button08 - message: 0 - -##### Button09 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity09 - - condition: state - entity_id: !input entity09 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button01 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity09 - - condition: state - entity_id: !input entity09 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button01 - message: 0 - -##### Button10 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity10 - - condition: state - entity_id: !input entity10 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button02 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity10 - - condition: state - entity_id: !input entity10 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button02 - message: 0 - -##### Button11 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity11 - - condition: state - entity_id: !input entity11 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button03 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity11 - - condition: state - entity_id: !input entity11 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button03 - message: 0 - -##### Button12 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity12 - - condition: state - entity_id: !input entity12 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button04 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity12 - - condition: state - entity_id: !input entity12 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button04 - message: 0 - -##### Button13 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity13 - - condition: state - entity_id: !input entity13 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button05 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity13 - - condition: state - entity_id: !input entity13 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button05 - message: 0 - -##### Button14 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity14 - - condition: state - entity_id: !input entity14 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button06 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity14 - - condition: state - entity_id: !input entity14 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button06 - message: 0 - -##### Button15 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity15 - - condition: state - entity_id: !input entity15 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button07 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity16 - - condition: state - entity_id: !input entity16 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button07 - message: 0 - -##### Button16 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity16 - - condition: state - entity_id: !input entity16 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage02.button08 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity16 - - condition: state - entity_id: !input entity16 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage02.button08 - message: 0 - -##### Button17 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity17 - - condition: state - entity_id: !input entity17 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button01 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity17 - - condition: state - entity_id: !input entity17 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button01 - message: 0 - -##### Button18 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity18 - - condition: state - entity_id: !input entity18 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button02 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity18 - - condition: state - entity_id: !input entity18 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button02 - message: 0 - -##### Button19 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity19 - - condition: state - entity_id: !input entity19 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button03 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity19 - - condition: state - entity_id: !input entity19 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button03 - message: 0 - -##### Button20 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity20 - - condition: state - entity_id: !input entity20 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button04 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity20 - - condition: state - entity_id: !input entity20 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button04 - message: 0 - -##### Button21 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity21 - - condition: state - entity_id: !input entity21 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button05 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity21 - - condition: state - entity_id: !input entity21 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button05 - message: 0 - -##### Button22 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity22 - - condition: state - entity_id: !input entity22 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button06 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity22 - - condition: state - entity_id: !input entity22 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button06 - message: 0 - -##### Button23 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity23 - - condition: state - entity_id: !input entity23 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button07 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity23 - - condition: state - entity_id: !input entity23 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button07 - message: 0 - -##### Button24 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity24 - - condition: state - entity_id: !input entity24 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage03.button08 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity24 - - condition: state - entity_id: !input entity24 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage03.button08 - message: 0 - -##### Button25 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity25 - - condition: state - entity_id: !input entity25 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button01 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity25 - - condition: state - entity_id: !input entity25 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button01 - message: 0 - -##### Button26 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity26 - - condition: state - entity_id: !input entity26 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button02 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity26 - - condition: state - entity_id: !input entity26 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button02 - message: 0 - -##### Button27 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity27 - - condition: state - entity_id: !input entity27 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button03 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity27 - - condition: state - entity_id: !input entity27 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button03 - message: 0 - -##### Button28 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity28 - - condition: state - entity_id: !input entity28 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button04 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity28 - - condition: state - entity_id: !input entity28 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button04 - message: 0 - -##### Button29 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity29 - - condition: state - entity_id: !input entity29 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button05 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity29 - - condition: state - entity_id: !input entity29 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button05 - message: 0 - -##### Button30 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity30 - - condition: state - entity_id: !input entity30 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button06 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity30 - - condition: state - entity_id: !input entity30 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button06 - message: 0 - -##### Button31 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity31 - - condition: state - entity_id: !input entity31 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button07 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity31 - - condition: state - entity_id: !input entity31 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button07 - message: 0 - -##### Button32 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity32 - - condition: state - entity_id: !input entity32 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage04.button08 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity32 - - condition: state - entity_id: !input entity32 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage04.button08 - message: 0 - -##### Button33 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity33 - - condition: state - entity_id: !input entity33 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button01 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity33 - - condition: state - entity_id: !input entity33 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button01 - message: 0 - -##### Button34 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity34 - - condition: state - entity_id: !input entity34 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button02 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity34 - - condition: state - entity_id: !input entity34 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button02 - message: 0 - -##### Button35 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity35 - - condition: state - entity_id: !input entity35 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button03 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity35 - - condition: state - entity_id: !input entity35 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button03 - message: 0 - -##### Button36 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity36 - - condition: state - entity_id: !input entity36 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button04 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity36 - - condition: state - entity_id: !input entity36 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button04 - message: 0 - -##### Button37 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity37 - - condition: state - entity_id: !input entity37 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button05 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity37 - - condition: state - entity_id: !input entity37 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button05 - message: 0 - -##### Button38 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity38 - - condition: state - entity_id: !input entity38 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button06 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity38 - - condition: state - entity_id: !input entity38 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button06 - message: 0 - -##### Button39 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity39 - - condition: state - entity_id: !input entity39 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button07 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity39 - - condition: state - entity_id: !input entity39 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button07 - message: 0 - -##### Button40 ################################################################# - - choose: - - conditions: - - condition: trigger - id: current_state_entity40 - - condition: state - entity_id: !input entity40 - state: - - "on" - - "open" - sequence: - - service: !input command_value - data: - component: buttonpage05.button08 - message: 1 - - conditions: - - condition: trigger - id: current_state_entity40 - - condition: state - entity_id: !input entity40 - state: - - "off" - - "closed" - sequence: - - service: !input command_value - data: - component: buttonpage05.button08 - 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 ##### -############################################################# -# -## -### -############################################################################################################################################################################################# +##### CLOSE - Action ##### +############################################################# \ No newline at end of file diff --git a/custom_configuration/.DS_Store b/custom_configuration/.DS_Store new file mode 100644 index 0000000..274517d Binary files /dev/null and b/custom_configuration/.DS_Store differ diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/.vscode/settings.json b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/.vscode/settings.json new file mode 100644 index 0000000..a04b218 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.yaml": "home-assistant" + } +} \ No newline at end of file diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/README.md b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/README.md new file mode 100644 index 0000000..cb7a47e --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/README.md @@ -0,0 +1,159 @@ +# NSPanel Custom with HA Blueprint +Custom Firmware for NsPanel (esphome) and HA Blueprint with configuration of button, light settings, thermostate, colorwheel, colortemp, cover, weather preview, automatic TFT upload etc. + +Why another version for the NSPanel? +Well - all versions I've seen have been missing something everywhere. +That's why I decided to create something myself. + +My thanks to Masto, Marcfager, lovejoy777, Hellis81 and SmartHome yourself ( link see below) for sharing your code. Give them the credit they deserve, I'm merely a copy paste ninja. XDD + + +### GOAL: +My goal was to create a version that could be quickly adopted for multiple NSPanels. +In addition, the configuration should be as simple as possible. Therefore I decided to put most of it into a HA Blueprint + +In addition, another NSPanel can be configured very quickly. But have a look yourself ;) + +![My project-1-16](https://user-images.githubusercontent.com/41958506/192649717-6b04cd1a-1829-4fd5-8ba4-09eaf32f85d0.png) +![My project-1-18](https://user-images.githubusercontent.com/41958506/192650810-c7210d15-a07e-4f70-a593-af0a51c7f4bb.png) + +(Home / Thermostat - more pictures see below) + +## Features: +- easy to use and simple configuration via Blueprint +- 40 buttons on 5 button pages with long press function for settings (more buttons are also possible) +- Weather + 5 days weather forcast +- Thermostat + Touch + Relay control for floor heating +- Light control (brightness-slider, colorwheel, TempColor-slider) - via Long Press +- Cover control (open, close, position-slider) - via long press +- Settings page (display brightness, display dim brightness, auto-dim, sleep mode, reboot NSPanel) +- Swipe between pages +- Top menu with 10 icons for specific states +- Heating control (hot water) +- Auto Upload TFT File to Nextion Display +- Swipe between pages +- modern design - design easy to change via Adobe Express (free + design template) +- 2 pysical switches +- and much more ;) + + +## NSPanel: +![My project-1-16](https://user-images.githubusercontent.com/41958506/192649717-6b04cd1a-1829-4fd5-8ba4-09eaf32f85d0.png) +![My project-1-17](https://user-images.githubusercontent.com/41958506/192650793-9b657fa2-8056-46d7-aca3-065cde291df8.png) + +(Home / Weather Forcast) + +![My project-1-18](https://user-images.githubusercontent.com/41958506/192650810-c7210d15-a07e-4f70-a593-af0a51c7f4bb.png) +![My project-1-20](https://user-images.githubusercontent.com/41958506/192652078-ec4f3268-c00b-42a8-b1f9-c4da3e53d7a5.png) + +(Thermostat / Settings Page) + +![My project-1-22](https://user-images.githubusercontent.com/41958506/192652105-23baac1d-9dee-40c1-8596-9cae8827cf1c.png) +![My project-1-23](https://user-images.githubusercontent.com/41958506/192652116-93b850d3-553b-4f14-bb0f-78dff959e2fd.png) + +(Light Settings Colorwheel / Light Settings TempColor) + +![My project-1-24](https://user-images.githubusercontent.com/41958506/192652126-91b0aae9-75ae-44a0-842d-0a78d93f2da5.png) +![My project-1-25](https://user-images.githubusercontent.com/41958506/192652131-604c0636-0f96-44b8-ae6a-793bde56d0e1.png) + +(Cover Settings / Button Page) + +![My project-1-26](https://user-images.githubusercontent.com/41958506/192652263-297cda87-3eff-452c-9ec3-3cd76da94de7.png) + +## Blueprint: +![Bildschirmfoto 2022-09-27 um 23 13 33](https://user-images.githubusercontent.com/41958506/192652755-069f91c9-927e-4aea-9569-d596cdfa0e56.png) + +# Pages + +## Home +- current weather with button to Weather Forcast page +- Temperature outside +- Status icons at the top +- Room temperature with button to thermostat page +- Room humidity +- Hot water temperature +- Button to display settings page + +## Weather Forcast +- 5 days Weather Forcast via swipe (Integration Accuweather - but should also go with another integration) +- Lowest and highest temperature outside +- Date +- Rain probability +- Sunshine hours +- Sun pressure +- Thunderstorm probability +- Wind speed +- Night thunderstorm probability and wind speed + +## Thermostat +- Touch Temp control +- Outside temperature +- Hot water +- Floor heating on, off and idle +- Hot water button +- Status icons + +## Display Settings +- Restart NSPanel +- Sleep mode - display off after time X +- Display brightness slider +- Display dim brightness slider +- Status Brightness in % + +## Light Settings +- Light on and off (alignment with HA) +- Light color with Colorwheel +- Light color with TempColor slider +- Brightness Slider +- Brightness in %. +- Tempcolor value +- Jump back to the right button page + +## Cover Settings +- Open and close cover +- Cover position via slider +- Cover battery value (I use Ikea roller blind) +- jump back to the right button page + +## Button Page +- 40 Button +- 5 Button pages +- all buttons with long press function +- automatic detection by long press if it is a light or cover for submenu +- swipe between all pages +- swipe also down and up for fast access to certain pages +- number of buttons and button pages can be extended - functions like long press, light settings and cover settings stay the same + +## Upcoming Features +- Shorten Esphome code and transfer to Blueprint +- Cover page with window open status as image +- small design adjustments +- Notifications on Home Page +- Energy and Gas consumption on home page +- Extra page for energy dashboard +- Garbage plan with icon on home page +- Let's see what ideas I still have ;) + +## HowTo Deutsch +1. den Code aus der Datei esphome.yaml kopieren und in HA unter esphome einfügen. Vorher muss natürlich ein Device erstellt werden. +1.2 in der ESPhome Datei müssen Passwörter eingesetzt werden. Entweder in der ESPHome Secret oder einfach in der ESPhome Datei +1.3 Einige Entities sind aktuell noch in der Esphome Datei angegeben (direkt unter den Passwörtern. Diese Entities müssen noch angepasst werden. In zukunft will ich aber auch diese ins Bluebrint einbauen +3. den Code aus der Datei blueprint.yaml kopieren und eine neue yaml Datei unter config/blueprints erstellen und den Code einfügen +4. HA Automationen neu starten -> Enticklerwerkzege -> YAML -> Automatisierungen +5. den Code aus der Datei sensor.yaml und climate.yaml kopieren und eine eigenen yaml Datei erstellen. Der Code wird in zukunft direkt im Blueprint eingebaut. +6. den Code aus der Datei folder_wather kopieren und in der coniguration.yaml einfügen +7. TFT File auf Home Assistant hochladen (Der Pfad kann später im Blueprint angegeben werden +8. Blueprint unter Automationen auswählen und und Felder ausfüllen. + + + +## Thanks to: +SmartHome yourself: https://www.youtube.com/c/SmarthomeyourselfDe_DIY + +Masto: https://github.com/masto/NSPanel-Demo-Files + +Marcfager: https://github.com/marcfager/nspanel-mf + +lovejoy77: https://github.com/lovejoy777/NSpanel + +Hellis81: https://github.com/Hellis81/NS-panel diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/blueprint.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/blueprint.yaml new file mode 100644 index 0000000..1ac4bc4 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/blueprint.yaml @@ -0,0 +1,14851 @@ +blueprint: + name: NSPanel Configuration + description: v2.0.0 - Configuration and synchronization NSpanele via Blueprint + domain: automation + input: + nspanel_name: + name: NSPanel Name + description: Name NSPanel. Esphome Dive Name is "Nspanel Buero" then HA make it the entity name "nspanel_buero". So nspanel_buero must be entered here. The correct name can also be found if you search for "last_click" under Entities -> sensor.nspanel_buero_last_click + selector: + text: {} + language: + name: Language for NSPanel (coming soon) + description: select your language for the values on the NSPanel display + selector: + select: + options: + - DE + - EN + tft_path: + name: Nextion TFT File Folder for the service Folder Watcher + 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: {} + delay_jump_page: + name: Delay to avoid sync problems (coming soon) + description: When switching pages, synchronization problems may occur due to the network / WLAN. To avoid this problem enter your value for the delay (milliseconds) + default: [] + selector: + text: {} + sync_value_ha: + name: Synchronization of the values in the Light Settings and Cover Settings submenus + description: This means that if the Light Settings or Cover Settings submenu is open and the state is changed via HA - the changes to the Brightness and Tempcolor values are changed immediately. -> Causes numbers jumps + default: 'No' + selector: + select: + options: + - label: 'No' + value: select_no + - label: 'Yes' + value: select_yes + sync_slider_ha: + name: Synchronization of the Slider in the Light Settings and Cover Settings submenus + description: This means that if the Light Settings or Cover Settings submenu is open and the state is changed via HA - the changes to the Brightness and Tempcolor sliders are changed immediately. -> Causes flickering on the slider + default: 'No' + selector: + select: + options: + - label: 'No' + value: select_no + - label: 'Yes' + value: select_yes + weather: + name: Weather Integration (coming soon) + description: select our Weather Integration + selector: + select: + options: + - Default + - AccuWeather + accuweather: + name: Name assigned to the AccuWeather Integration (Optional) + description: Name assigned to the AccuWeather Integration. For Example - Accuweather Intergations name is Home Weather -> Then please write * home_weather * in it. You can find the needed value in your entities + default: [] + selector: + text: {} + outdoortemp: + name: Outdoor Temperature Sensor (Optional) + description: select the Temperature Sensor. If no outdoor sensor available write "default" or "accuweather" to use the outdoor temperature of the selected Weather Integration. This value is displayed on the Home Page an Thermostat Page + default: [] + selector: + entity: + domain: + - sensor + 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 + left_button_entity: + name: Left Button (Optional) + description: Left Hardware Button - Select the entity that should be switched + default: [] + selector: + entity: + domain: + - light + - switch + - input_boolean + - cover + right_button_entity: + name: Right Button (Optional) + description: Right Hardware Button - Select the entity that should be switched + default: [] + selector: + entity: + domain: + - light + - switch + - input_boolean + - cover + +##### Button ##### + entity01: + name: Button 01 (Optional) + description: Nextion Editor - *buttonpage01.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity01_name: + name: Name "Button 01" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity02: + name: Button 02 (Optional) + description: Nextion Editor - *buttonpage01.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity02_name: + name: Name "Button 02" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity03: + name: Button 03 (Optional) + description: Nextion Editor - *buttonpage01.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity03_name: + name: Name "Button 03" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity04: + name: Button 04 (Optional) + description: Nextion Editor - *buttonpage01.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity04_name: + name: Name "Button 04" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity05: + name: Button 05 (Optional) + description: Nextion Editor - *buttonpage01.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity05_name: + name: Name "Button 05" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity06: + name: Button 06 (Optional) + description: Nextion Editor - *buttonpage01.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity06_name: + name: Name "Button 06" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity07: + name: Button 07 (Optional) + description: Nextion Editor - *buttonpage01.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity07_name: + name: Name "Button 07" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity08: + name: Button 08 (Optional) + description: Nextion Editor - *buttonpage01.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity08_name: + name: Name "Button 08" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity09: + name: Button 09 (Optional) + description: Nextion Editor - *buttonpage02.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity09_name: + name: Name "Button 09" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity10: + name: Button 10 (Optional) + description: Nextion Editor - *buttonpage02.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity10_name: + name: Name "Button 10" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity11: + name: Button 11 (Optional) + description: Nextion Editor - *buttonpage02.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity11_name: + name: Name "Button 11" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity12: + name: Button 12 (Optional) + description: Nextion Editor - *buttonpage02.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity12_name: + name: Name "Button 12" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity13: + name: Button 13 (Optional) + description: Nextion Editor - *buttonpage01.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity13_name: + name: Name "Button 13" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity14: + name: Button 14 (Optional) + description: Nextion Editor - *buttonpage02.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity14_name: + name: Name "Button 14" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity15: + name: Button 15 (Optional) + description: Nextion Editor - *buttonpage02.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity15_name: + name: Name "Button 15" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity16: + name: Button 16 (Optional) + description: Nextion Editor - *buttonpage02.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity16_name: + name: Name "Button 16" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity17: + name: Button 17 (Optional) + description: Nextion Editor - *buttonpage03.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity17_name: + name: Name "Button 17" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity18: + name: Button 18 (Optional) + description: Nextion Editor - *buttonpage03.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity18_name: + name: Name "Button 18" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity19: + name: Button 19 (Optional) + description: Nextion Editor - *buttonpage03.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity19_name: + name: Name "Button 19" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity20: + name: Button 20 (Optional) + description: Nextion Editor - *buttonpage03.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity20_name: + name: Name "Button 20" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity21: + name: Button 21 (Optional) + description: Nextion Editor - *buttonpage03.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity21_name: + name: Name "Button 21" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity22: + name: Button 22 (Optional) + description: Nextion Editor - *buttonpage03.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity22_name: + name: Name "Button 22" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity23: + name: Button 23 (Optional) + description: Nextion Editor - *buttonpage03.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity23_name: + name: Name "Button 23" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity24: + name: Button 24 (Optional) + description: Nextion Editor - *buttonpage03.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity24_name: + name: Name "Button 24" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity25: + name: Button 25 (Optional) + description: Nextion Editor - *buttonpage04.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity25_name: + name: Name "Button 25" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity26: + name: Button 26 (Optional) + description: Nextion Editor - *buttonpage04.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity26_name: + name: Name "Button 26" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity27: + name: Button 27 (Optional) + description: Nextion Editor - *buttonpage04.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity27_name: + name: Name "Button 27" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity28: + name: Button 28 (Optional) + description: Nextion Editor - *buttonpage04.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity28_name: + name: Name "Button 28" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity29: + name: Button 29 (Optional) + description: Nextion Editor - *buttonpage04.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity29_name: + name: Name "Button 29" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity30: + name: Button 30 (Optional) + description: Nextion Editor - *buttonpage04.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity30_name: + name: Name "Button 30" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity31: + name: Button 31 (Optional) + description: Nextion Editor - *buttonpage04.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity31_name: + name: Name "Button 31" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + entity32: + name: Button 32 (Optional) + description: Nextion Editor - *buttonpage04.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity32_name: + name: Name "Button 32" (Optional) + description: Button label - 10 characters are supported + default: [] + selector: + text: {} + +mode: parallel +max: 5000 + +######################################### +# +# +############################################################# +##### CLOSE - INPUT ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - Variables ##### +############################################################# +# +# +######################################### +trigger_variables: + nspanel_name_trigger: !input "nspanel_name" + last_click: "sensor.{{ nspanel_name_trigger }}_last_click" + last_click_lightsettings: "sensor.{{ nspanel_name_trigger }}_last_click_lightsettings" + last_click_coversettings: "sensor.{{ nspanel_name_trigger }}_last_click_coversettings" + left_button: "binary_sensor.{{ nspanel_name_trigger }}_left_button" + right_button: "binary_sensor.{{ nspanel_name_trigger }}_right_button" + nextion_inited_trigger: "switch.{{ nspanel_name_trigger }}_nextion_inited" + entity_long_trigger: "{{ entity_long }}" + + +variables: + nspanel_name: !input "nspanel_name" + command_text_printf: "esphome.{{ nspanel_name }}_send_command_text_printf" + command_value: "esphome.{{ nspanel_name }}_send_command_value" + command_printf: "esphome.{{ nspanel_name }}_send_command_printf" + command_font_color: "esphome.{{ nspanel_name }}_send_command_font_color" + command_background_color: "esphome.{{ nspanel_name }}_send_command_background_color" + tft_upload: "esphome.{{ nspanel_name }}_upload_tft" + tft_path: !input "tft_path" + humidity: !input "humidity" + hotwatertemp: !input "hotwatertemp" + outdoortemp: !input "outdoortemp" + time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}" + weather: !input "weather" + language: !input "language" + left_button_entity: !input "left_button_entity" + right_button_entity: !input "right_button_entity" + +# Sync Settings + delay_jump_page: !input "delay_jump_page" + sync_slider_ha: !input "sync_slider_ha" + sync_value_ha: !input "sync_value_ha" + + +# Icons Mapping + cover_pic_closed: "106" + cover_pic_open: "107" + battery_icon: "108" + light_pic_off: "125" + light_pic_on: "126" + + +# color for buttons + button_light_off: "90" + button_light_on: "91" + button_switch_off: "92" + button_switch_on: "93" + button_cover_off: "94" + button_cover_on: "95" + button_color_1: "65535" + button_color_2: "10597" + + ##### Weather DE ##### + date0_de: "{{ ((as_timestamp(now())) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date1_de: "{{ ((as_timestamp(now()) + 86400) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date2_de: "{{ ((as_timestamp(now()) + 172800) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date3_de: "{{ ((as_timestamp(now()) + 259200) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + date4_de: "{{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Montag,')| replace('Tue', 'Dienstag,')| replace('Wed', 'Mittwoch,')| replace('Thu', 'Donnerstag,')| replace('Fri', 'Freitag,')| replace('Sat', 'Samstag,')| replace('Sun', 'Sonntag,') }}" + + ##### Weather EN ##### + date0_en: "{{ ((as_timestamp(now())) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date1_en: "{{ ((as_timestamp(now()) + 86400) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date2_en: "{{ ((as_timestamp(now()) + 172800) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date3_en: "{{ ((as_timestamp(now()) + 259200) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + date4_en: "{{ ((as_timestamp(now()) + 345600) | timestamp_custom('%a %d.%m' )) | replace('Mon', 'Monday,')| replace('Tue', 'Tuesday,')| replace('Wed', 'Wednesday,')| replace('Thu', 'Thursday,')| replace('Fri', 'Friday,')| replace('Sat', 'Saturday,')| replace('Sun', 'Sunday,') }}" + + ##### Meteorologisk HA Default ##### + ha_weather: "weather.home" + + ##### AccuWeather ##### + accuweather: !input "accuweather" + accuweather_home: "weather.{{ accuweather }}" + ##### Forcast Day 0 Accuweather ##### + accuweather_realfeel_temperature_min_0d: "sensor.{{ accuweather }}_realfeel_temperature_min_0d" + accuweather_realfeel_temperature_max_0d: "sensor.{{ accuweather }}_realfeel_temperature_max_0d" + accuweather_hours_of_sun_0d: "sensor.{{ accuweather }}_hours_of_sun_0d" + accuweather_uv_index_0d: "sensor.{{ accuweather }}_uv_index_0d" + accuweather_thunderstorm_probability_day_0d: "sensor.{{ accuweather }}_thunderstorm_probability_day_0d" + accuweather_thunderstorm_probability_night_0d: "sensor.{{ accuweather }}_thunderstorm_probability_night_0d" + accuweather_wind_day_0d: "sensor.{{ accuweather }}_wind_day_0d" + accuweather_wind_night_0d: "sensor.{{ accuweather }}_wind_night_0d" + ##### Forcast Day 1 AccuWeather ##### + accuweather_realfeel_temperature_min_1d: "sensor.{{ accuweather }}_realfeel_temperature_min_1d" + accuweather_realfeel_temperature_max_1d: "sensor.{{ accuweather }}_realfeel_temperature_max_1d" + accuweather_hours_of_sun_1d: "sensor.{{ accuweather }}_hours_of_sun_1d" + accuweather_uv_index_1d: "sensor.{{ accuweather }}_uv_index_1d" + accuweather_thunderstorm_probability_day_1d: "sensor.{{ accuweather }}_thunderstorm_probability_day_1d" + accuweather_thunderstorm_probability_night_1d: "sensor.{{ accuweather }}_thunderstorm_probability_night_1d" + accuweather_wind_day_1d: "sensor.{{ accuweather }}_wind_day_1d" + accuweather_wind_night_1d: "sensor.{{ accuweather }}_wind_night_1d" + ##### Forcast Day 2 AccuWeather ##### + accuweather_realfeel_temperature_min_2d: "sensor.{{ accuweather }}_realfeel_temperature_min_2d" + accuweather_realfeel_temperature_max_2d: "sensor.{{ accuweather }}_realfeel_temperature_max_2d" + accuweather_hours_of_sun_2d: "sensor.{{ accuweather }}_hours_of_sun_2d" + accuweather_uv_index_2d: "sensor.{{ accuweather }}_uv_index_2d" + accuweather_thunderstorm_probability_day_2d: "sensor.{{ accuweather }}_thunderstorm_probability_day_2d" + accuweather_thunderstorm_probability_night_2d: "sensor.{{ accuweather }}_thunderstorm_probability_night_2d" + accuweather_wind_day_2d: "sensor.{{ accuweather }}_wind_day_2d" + accuweather_wind_night_2d: "sensor.{{ accuweather }}_wind_night_2d" + ##### Forcast Day 3 AccuWeather ##### + accuweather_realfeel_temperature_min_3d: "sensor.{{ accuweather }}_realfeel_temperature_min_3d" + accuweather_realfeel_temperature_max_3d: "sensor.{{ accuweather }}_realfeel_temperature_max_3d" + accuweather_hours_of_sun_3d: "sensor.{{ accuweather }}_hours_of_sun_3d" + accuweather_uv_index_3d: "sensor.{{ accuweather }}_uv_index_3d" + accuweather_thunderstorm_probability_day_3d: "sensor.{{ accuweather }}_thunderstorm_probability_day_3d" + accuweather_thunderstorm_probability_night_3d: "sensor.{{ accuweather }}_thunderstorm_probability_night_3d" + accuweather_wind_day_3d: "sensor.{{ accuweather }}_wind_day_3d" + accuweather_wind_night_3d: "sensor.{{ accuweather }}_wind_night_3d" + ##### Forcast Day 4 AccuWeather ##### + accuweather_realfeel_temperature_min_4d: "sensor.{{ accuweather }}_realfeel_temperature_min_4d" + accuweather_realfeel_temperature_max_4d: "sensor.{{ accuweather }}_realfeel_temperature_max_4d" + accuweather_hours_of_sun_4d: "sensor.{{ accuweather }}_hours_of_sun_4d" + accuweather_uv_index_4d: "sensor.{{ accuweather }}_uv_index_4d" + accuweather_thunderstorm_probability_day_4d: "sensor.{{ accuweather }}_thunderstorm_probability_day_4d" + accuweather_thunderstorm_probability_night_4d: "sensor.{{ accuweather }}_thunderstorm_probability_night_4d" + accuweather_wind_day_4d: "sensor.{{ accuweather }}_wind_day_4d" + accuweather_wind_night_4d: "sensor.{{ accuweather }}_wind_night_4d" + +##### Buttons ##### + entity01: !input "entity01" + entity01_name: !input "entity01_name" + entity02: !input "entity02" + entity02_name: !input "entity02_name" + entity03: !input "entity03" + entity03_name: !input "entity03_name" + entity04: !input "entity04" + entity04_name: !input "entity04_name" + entity05: !input "entity05" + entity05_name: !input "entity05_name" + entity06: !input "entity06" + entity06_name: !input "entity06_name" + entity07: !input "entity07" + entity07_name: !input "entity07_name" + entity08: !input "entity08" + entity08_name: !input "entity08_name" + entity09: !input "entity09" + entity09_name: !input "entity09_name" + entity10: !input "entity10" + entity10_name: !input "entity10_name" + entity11: !input "entity11" + entity11_name: !input "entity11_name" + entity12: !input "entity12" + entity12_name: !input "entity12_name" + entity13: !input "entity13" + entity13_name: !input "entity13_name" + entity14: !input "entity14" + entity14_name: !input "entity14_name" + entity15: !input "entity15" + entity15_name: !input "entity15_name" + entity16: !input "entity16" + entity16_name: !input "entity16_name" + entity17: !input "entity17" + entity17_name: !input "entity17_name" + entity18: !input "entity18" + entity18_name: !input "entity18_name" + entity19: !input "entity19" + entity19_name: !input "entity19_name" + entity20: !input "entity20" + entity20_name: !input "entity20_name" + entity21: !input "entity21" + entity21_name: !input "entity21_name" + entity22: !input "entity22" + entity22_name: !input "entity22_name" + entity23: !input "entity23" + entity23_name: !input "entity23_name" + entity24: !input "entity24" + entity24_name: !input "entity24_name" + entity25: !input "entity25" + entity25_name: !input "entity25_name" + entity26: !input "entity26" + entity26_name: !input "entity26_name" + entity27: !input "entity27" + entity27_name: !input "entity27_name" + entity28: !input "entity28" + entity28_name: !input "entity28_name" + entity29: !input "entity29" + entity29_name: !input "entity29_name" + entity30: !input "entity30" + entity30_name: !input "entity30_name" + entity31: !input "entity31" + entity31_name: !input "entity31_name" + entity32: !input "entity32" + entity32_name: !input "entity32_name" + +######################################### +# +# +############################################################# +##### CLOSE - Variables ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - Trigger ##### +############################################################# +# +# +######################################### + +trigger: + ##### TFT Upload ##### + - platform: event + event_type: folder_watcher + event_data: + event_type: modified + path: !input "tft_path" + id: tft_upload + + #### NSPanel boot Step 0 - Start #### nextion_inited_trigger +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# id: nspanel_boot_start + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + id: nspanel_boot_start + + #### NSPanel boot Step 1 - Language #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 5 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:5" + id: nspanel_boot_language + + #### NSPanel boot Step 2 - Buttonpage 1 #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 10 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:10" + id: nspanel_boot_buttonpage01 + + #### NSPanel boot Step 3 - Buttonpage 2 #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 15 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:15" + id: nspanel_boot_buttonpage02 + + #### NSPanel boot Step 4 - Buttonpage 3 #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 20 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:20" + id: nspanel_boot_buttonpage03 + + #### NSPanel boot Step 5 - Buttonpage 4 #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 25 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:25" + id: nspanel_boot_buttonpage04 + + #### NSPanel boot Step 6 - Weather #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 30 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:30" + id: nspanel_boot_weather + + #### NSPanel boot Step 7 - Entities #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 35 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:35" + id: nspanel_boot_entities + + #### NSPanel boot Step 8 - Entities #### +# - platform: state +# entity_id: !input "nextion_inited" +# to: "on" +# for: +# seconds: 50 + - platform: template + value_template: '{{ states(nextion_inited_trigger) is match "on" }}' + for: "00:00:50" + id: nspanel_boot_finish + +######################################################################################################################## + + ##### Page Button - Trigger ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click }}" + id: short_press + + ##### Button LONG Press for jump to Lightsetting or Coversetting Page - Trigger ##### + - platform: template + value_template: '{{ states(last_click) is match "press" }}' + for: + seconds: 1 + id: long_press + + ##### Page Lightsettings - Trigger ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_lightsettings }}" + id: light_settings + + ##### Page Coversettings - Trigger ##### + - platform: event + event_type: state_changed + event_data: + entity_id: "{{ last_click_coversettings }}" + id: cover_settings + + ##### Page Button Entity sync - Trigger ##### + - platform: template + value_template: '{{ states(last_click) is match "button" }}' + id: button_page + +######################################################################################################################## + + ##### Time - Trigger ##### + - platform: time_pattern + minutes: "/1" + id: time_state + + #### Weather State - Trigger #### + - platform: template + value_template: '{{ states(last_click) is match "weather" }}' + id: weather_update_state + + #### Weather Time - Trigger #### + - platform: time_pattern + minutes: "10" + id: weather_update_time + + ##### 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 + + ##### Left Button - Trigger ##### + - platform: template + value_template: '{{ states(left_button) is match "on" }}' + id: left_button_press + + ##### Right Button - Trigger ##### + - platform: template + value_template: '{{ states(right_button) is match "off" }}' + id: right_button_press + +##### Button Sync Trigger ################################################################################################################# + + ##### Button01 Sync - Trigger ##### + - platform: state + entity_id: !input "entity01" + id: current_state_entity01 + + ##### Button02 Sync - Trigger ##### + - platform: state + entity_id: !input "entity02" + id: current_state_entity02 + + ##### Button03 Sync - Trigger ##### + - platform: state + entity_id: !input "entity03" + id: current_state_entity03 + + ##### Button04 Sync - Trigger ##### + - platform: state + entity_id: !input "entity04" + id: current_state_entity04 + + ##### Button05 Sync - Trigger ##### + - platform: state + entity_id: !input "entity05" + id: current_state_entity05 + + ##### Button06 Sync - Trigger ##### + - platform: state + entity_id: !input "entity06" + id: current_state_entity06 + + ##### Button07 Sync - Trigger ##### + - platform: state + entity_id: !input "entity07" + id: current_state_entity07 + + ##### Button08 Sync - Trigger ##### + - platform: state + entity_id: !input "entity08" + id: current_state_entity08 + + ##### Button09 Sync - Trigger ##### + - platform: state + entity_id: !input "entity09" + id: current_state_entity09 + + ##### Button10 Sync - Trigger ##### + - platform: state + entity_id: !input "entity10" + id: current_state_entity10 + + ##### Button11 Sync - Trigger ##### + - platform: state + entity_id: !input "entity11" + id: current_state_entity11 + + ##### Button12 Sync - Trigger ##### + - platform: state + entity_id: !input "entity12" + id: current_state_entity12 + + ##### Button13 Sync - Trigger ##### + - platform: state + entity_id: !input "entity13" + id: current_state_entity13 + + ##### Button14 Sync - Trigger ##### + - platform: state + entity_id: !input "entity14" + id: current_state_entity14 + + ##### Button15 Sync - Trigger ##### + - platform: state + entity_id: !input "entity15" + id: current_state_entity15 + + ##### Button16 Sync - Trigger ##### + - platform: state + entity_id: !input "entity16" + id: current_state_entity16 + + ##### Button17 Sync - Trigger ##### + - platform: state + entity_id: !input "entity17" + id: current_state_entity17 + + ##### Button18 Sync - Trigger ##### + - platform: state + entity_id: !input "entity18" + id: current_state_entity18 + + ##### Button19 Sync - Trigger ##### + - platform: state + entity_id: !input "entity19" + id: current_state_entity19 + + ##### Button20 Sync - Trigger ##### + - platform: state + entity_id: !input "entity20" + id: current_state_entity20 + + ##### Button21 Sync - Trigger ##### + - platform: state + entity_id: !input "entity21" + id: current_state_entity21 + + ##### Button22 Sync - Trigger ##### + - platform: state + entity_id: !input "entity22" + id: current_state_entity22 + + ##### Button23 Sync - Trigger ##### + - platform: state + entity_id: !input "entity23" + id: current_state_entity23 + + ##### Button24 Sync - Trigger ##### + - platform: state + entity_id: !input "entity24" + id: current_state_entity24 + + ##### Button25 Sync - Trigger ##### + - platform: state + entity_id: !input "entity25" + id: current_state_entity25 + + ##### Button26 Sync - Trigger ##### + - platform: state + entity_id: !input "entity26" + id: current_state_entity26 + + ##### Button27 Sync - Trigger ##### + - platform: state + entity_id: !input "entity27" + id: current_state_entity27 + + ##### Button28 Sync - Trigger ##### + - platform: state + entity_id: !input "entity28" + id: current_state_entity28 + + ##### Button29 Sync - Trigger ##### + - platform: state + entity_id: !input "entity29" + id: current_state_entity29 + + ##### Button30 Sync - Trigger ##### + - platform: state + entity_id: !input "entity30" + id: current_state_entity30 + + ##### Button31 Sync - Trigger ##### + - platform: state + entity_id: !input "entity31" + id: current_state_entity31 + + ##### Button32 Sync - Trigger ##### + - platform: state + entity_id: !input "entity32" + id: current_state_entity32 + +######################################### +# +# +############################################################# +##### 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 }} + {%- elif states(last_click) == "releasebuttonpage01button04" -%} {{ entity04 }} + {%- elif states(last_click) == "releasebuttonpage01button05" -%} {{ entity05 }} + {%- elif states(last_click) == "releasebuttonpage01button06" -%} {{ entity06 }} + {%- elif states(last_click) == "releasebuttonpage01button07" -%} {{ entity07 }} + {%- elif states(last_click) == "releasebuttonpage01button08" -%} {{ entity08 }} + {%- elif states(last_click) == "releasebuttonpage02button01" -%} {{ entity09 }} + {%- elif states(last_click) == "releasebuttonpage02button02" -%} {{ entity10 }} + {%- elif states(last_click) == "releasebuttonpage02button03" -%} {{ entity11 }} + {%- elif states(last_click) == "releasebuttonpage02button04" -%} {{ entity12 }} + {%- elif states(last_click) == "releasebuttonpage02button05" -%} {{ entity13 }} + {%- elif states(last_click) == "releasebuttonpage02button06" -%} {{ entity14 }} + {%- elif states(last_click) == "releasebuttonpage02button07" -%} {{ entity15 }} + {%- elif states(last_click) == "releasebuttonpage02button08" -%} {{ entity16 }} + {%- elif states(last_click) == "releasebuttonpage03button01" -%} {{ entity17 }} + {%- elif states(last_click) == "releasebuttonpage03button02" -%} {{ entity18 }} + {%- elif states(last_click) == "releasebuttonpage03button03" -%} {{ entity19 }} + {%- elif states(last_click) == "releasebuttonpage03button04" -%} {{ entity20 }} + {%- elif states(last_click) == "releasebuttonpage03button05" -%} {{ entity21 }} + {%- elif states(last_click) == "releasebuttonpage03button06" -%} {{ entity22 }} + {%- elif states(last_click) == "releasebuttonpage03button07" -%} {{ entity23 }} + {%- elif states(last_click) == "releasebuttonpage03button08" -%} {{ entity24 }} + {%- elif states(last_click) == "releasebuttonpage04button01" -%} {{ entity25 }} + {%- elif states(last_click) == "releasebuttonpage04button02" -%} {{ entity26 }} + {%- elif states(last_click) == "releasebuttonpage04button03" -%} {{ entity27 }} + {%- elif states(last_click) == "releasebuttonpage04button04" -%} {{ entity28 }} + {%- elif states(last_click) == "releasebuttonpage04button05" -%} {{ entity29 }} + {%- elif states(last_click) == "releasebuttonpage04button06" -%} {{ entity30 }} + {%- elif states(last_click) == "releasebuttonpage04button07" -%} {{ entity31 }} + {%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32 }} + {%- endif -%} + + ##### Entity - Page Lightsettings ##### + entity_long: >- + {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01 }} + {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02 }} + {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ entity03 }} + {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ entity04 }} + {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ entity05 }} + {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ entity06 }} + {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ entity07 }} + {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ entity08 }} + {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ entity09 }} + {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ entity10 }} + {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ entity11 }} + {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ entity12 }} + {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ entity13 }} + {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ entity14 }} + {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ entity15 }} + {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ entity16 }} + {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ entity17 }} + {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ entity18 }} + {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ entity19 }} + {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ entity20 }} + {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ entity21 }} + {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ entity22 }} + {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ entity23 }} + {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ entity24 }} + {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ entity25 }} + {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ entity26 }} + {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ entity27 }} + {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ entity28 }} + {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ entity29 }} + {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ entity30 }} + {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ entity31 }} + {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32 }} + {%- endif -%} + + ##### Entity Name - Page Lightsettings ##### + entity_long_name: >- + {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01_name }} + {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02_name }} + {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ entity03_name }} + {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ entity04_name }} + {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ entity05_name }} + {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ entity06_name }} + {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ entity07_name }} + {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ entity08_name }} + {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ entity09_name }} + {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ entity10_name }} + {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ entity11_name }} + {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ entity12_name }} + {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ entity13_name }} + {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ entity14_name }} + {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ entity15_name }} + {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ entity16_name }} + {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ entity17_name }} + {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ entity18_name }} + {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ entity19_name }} + {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ entity20_name }} + {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ entity21_name }} + {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ entity22_name }} + {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ entity23_name }} + {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ entity24_name }} + {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ entity25_name }} + {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ entity26_name }} + {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ entity27_name }} + {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ entity28_name }} + {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ entity29_name}} + {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ entity30_name }} + {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ entity31_name }} + {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32_name }} + {%- 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" }} + {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ "page buttonpage04" }} + {%- endif -%} + +######################################################################################################################## + + ##### NSPanel Loading##### + - choose: + - conditions: + - condition: trigger + id: nspanel_boot_start + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.loading + message: "Loading - PLS WAIT!" + + ##### NSPanel Loading##### + - choose: + - conditions: + - condition: trigger + id: nspanel_boot_finish + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.loading + message: " " + + ##### language Setting DE ##### + - choose: + - conditions: + - condition: trigger + id: nspanel_boot_language + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: weather01.a01 + message: Heute + - service: "{{ command_text_printf }}" + data: + component: weather02.a01 + message: Morgen + - service: "{{ command_text_printf }}" + data: + component: weather03.a01 + message: in 2 Tagen + - service: "{{ command_text_printf }}" + data: + component: weather04.a01 + message: in 3 Tagen + - service: "{{ command_text_printf }}" + data: + component: weather05.a01 + message: in 4 Tagen + - service: "{{ command_text_printf }}" + data: + component: settings.a06 + message: Neustart + - service: "{{ command_text_printf }}" + data: + component: settings.a07 + message: Sleep + - service: "{{ command_text_printf }}" + data: + component: settings.a08 + message: Helligkeit + - service: "{{ command_text_printf }}" + data: + component: settings.a09 + message: Dimmen + - service: "{{ command_text_printf }}" + data: + component: coversettings.a07 + message: Rollo + - service: "{{ command_text_printf }}" + data: + component: coversettings.a08 + message: Position + - service: "{{ command_text_printf }}" + data: + component: lightsettings.a07 + message: Licht + - service: "{{ command_text_printf }}" + data: + component: lightsettings.a08 + message: Helligkeit + + ##### language Setting EN ##### + - choose: + - conditions: + - condition: trigger + id: nspanel_boot_language + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: weather01.a01 + message: Today + - service: "{{ command_text_printf }}" + data: + component: weather02.a01 + message: Tomorrow + - service: "{{ command_text_printf }}" + data: + component: weather03.a01 + message: in 2 Days + - service: "{{ command_text_printf }}" + data: + component: weather04.a01 + message: in 3 Days + - service: "{{ command_text_printf }}" + data: + component: weather05.a01 + message: in 4 Days + - service: "{{ command_text_printf }}" + data: + component: settings.a06 + message: Reboot + - service: "{{ command_text_printf }}" + data: + component: settings.a07 + message: Sleep + - service: "{{ command_text_printf }}" + data: + component: settings.a08 + message: Brightness + - service: "{{ command_text_printf }}" + data: + component: settings.a09 + message: Dimming + - service: "{{ command_text_printf }}" + data: + component: coversettings.a07 + message: Cover + - service: "{{ command_text_printf }}" + data: + component: coversettings.a08 + message: Position + - service: "{{ command_text_printf }}" + data: + component: lightsettings.a07 + message: Light + - service: "{{ command_text_printf }}" + data: + component: lightsettings.a08 + message: Brightness + + ##### Date Home Page + Forcast DE ##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_language + - time_state + - condition: template + value_template: '{{ language == "DE" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date0_de }}" + - service: "{{ command_text_printf }}" + data: + component: weather01.a02 + message: "{{ date0_de }}" + - service: "{{ command_text_printf }}" + data: + component: weather02.a02 + message: "{{ date1_de }}" + - service: "{{ command_text_printf }}" + data: + component: weather03.a02 + message: "{{ date2_de }}" + - service: "{{ command_text_printf }}" + data: + component: weather04.a02 + message: "{{ date3_de }}" + - service: "{{ command_text_printf }}" + data: + component: weather05.a02 + message: "{{ date4_de }}" + +##### Date Home Page + Forcast EN ##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_language + - time_state + - condition: template + value_template: '{{ language == "EN" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a02 + message: "{{ date0_en }}" + - service: "{{ command_text_printf }}" + data: + component: weather01.a02 + message: "{{ date0_en }}" + - service: "{{ command_text_printf }}" + data: + component: weather02.a02 + message: "{{ date1_en }}" + - service: "{{ command_text_printf }}" + data: + component: weather03.a02 + message: "{{ date2_en }}" + - service: "{{ command_text_printf }}" + data: + component: weather04.a02 + message: "{{ date3_en }}" + - service: "{{ command_text_printf }}" + data: + component: weather05.a02 + message: "{{ date4_de }}" + +##### Time Home Page Loading##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_entities + - time_state + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a01 + message: "{{ time }}" + + + + + +################################################## +##### ACTION - SHORT Press an LONG Press Button Page ########################################################################################################################################################## +################################################## + + + + + +##### ACTION - Page Button - SHORT Press - Toggle Enities ##### + - 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 }}" + + + + + +################################################## +##### ACTION - Light Setting Page ########################################################################################################################################################## +################################################## + + + + + +##### ACTION - Page Lightsettings - JUMP to Page Lightsettings and SYNC Light Settings ##### + - choose: + - conditions: + - condition: trigger + id: long_press + sequence: + ##### send some current Values to Cover Setting page ##### + - if: + - condition: template + value_template: '{{ entity_long is match "light." }}' + then: + - service: "{{ command_printf }}" + data: + cmd: page lightsettings + - delay: + milliseconds: 5 + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' + - delay: + milliseconds: 10 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_name + message: '{{ entity_long_name }}' + - delay: + milliseconds: 15 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' + - delay: + milliseconds: 20 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' + ##### Light PIC - ON ##### + - if: + - condition: template + value_template: '{{ states(entity_long) == "on" }}' + then: + - delay: + milliseconds: 25 + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_on }} + ##### Light PIC - OFF ##### + - if: + - condition: template + value_template: '{{ states(entity_long) == "off" }}' + then: + - delay: + milliseconds: 25 + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_off }} + ##### Check Color_Temp Value is available when yes send some current Values ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'color_temp') != none }}" + then: + - delay: + milliseconds: 30 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: 35 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: 40 + - service: "{{ command_value }}" + data: + component: lightsettings.tempslider + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + + + + +##### ACTION - Page Lightsettings - Changes from HA ##### + - choose: + - conditions: + - condition: trigger + id: + - current_state_entity01 + - current_state_entity02 + - current_state_entity03 + - current_state_entity04 + - current_state_entity05 + - current_state_entity06 + - current_state_entity07 + - current_state_entity08 + - current_state_entity09 + - current_state_entity10 + - current_state_entity11 + - current_state_entity12 + - current_state_entity13 + - current_state_entity14 + - current_state_entity15 + - current_state_entity16 + - current_state_entity17 + - current_state_entity18 + - current_state_entity19 + - current_state_entity20 + - current_state_entity21 + - current_state_entity22 + - current_state_entity23 + - current_state_entity24 + - current_state_entity25 + - current_state_entity26 + - current_state_entity27 + - current_state_entity28 + - current_state_entity29 + - current_state_entity30 + - current_state_entity31 + - current_state_entity32 + sequence: + ##### Light PIC - ON ##### + - if: + - condition: template + value_template: '{{ states(entity_long) == "on" }}' + then: + - delay: + milliseconds: 5 + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_on }} + ##### Light PIC - OFF ##### + - if: + - condition: template + value_template: '{{ states(entity_long) == "off" }}' + then: + - delay: + milliseconds: 5 + - service: "{{ command_printf }}" + data: + cmd: lightsettings.light_status.pic={{ light_pic_off }} + ##### Brightness Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ entity_long is match "light." and sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: 5 + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "brightness") | int ) |round(0) }}' + ##### Temp Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ state_attr(entity_long, "color_temp") != none and sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: 10 + - service: "{{ command_value }}" + data: + component: lightsettings.tempslider + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + ##### Brightness Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ entity_long is match "light." and sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: 10 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' + - delay: + milliseconds: 15 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ (state_attr(entity_long, "brightness") | int * 100 / 255) |round(0) }} %' + ##### Temp Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ state_attr(entity_long, "color_temp") != none and sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: 20 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + - delay: + milliseconds: 25 + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ (state_attr(entity_long, "color_temp") | int ) |round(0) }}' + + + + + +##### ACTION - Page Lightsettings - Brightness Slider MOVE ##### + - choose: + - conditions: + - condition: trigger + id: light_settings + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "brightness\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + brightness: '{{ states(last_click_lightsettings) |replace("brightness","") | int }}' + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value + message: '{{ ((states(last_click_lightsettings) |replace("brightness","") | int) * 100 /255) |round(0) }} %' + - service: "{{ command_text_printf }}" + data: + component: lightsettings.light_value_2 + message: '{{ ((states(last_click_lightsettings) |replace("brightness","") | int) * 100 /255) |round(0) }} %' + + + + + +##### ACTION - Page Lightsettings - color_Temp Slider MOVE ##### + - choose: + - conditions: + - condition: trigger + id: light_settings + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "colortemp\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + color_temp: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value + message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + - service: "{{ command_text_printf }}" + data: + component: lightsettings.temp_value_2 + message: '{{ states(last_click_lightsettings) |replace("colortemp","") | int }}' + + + + + +##### ACTION - Page Lightsettings - Color RGB Slider MOVE ##### + - choose: + - conditions: + - condition: trigger + id: light_settings + - condition: template + value_template: '{{ states(last_click_lightsettings) is match "\d+,\d+,\d+" }}' + sequence: + - service: light.turn_on + data: + entity_id: "{{ entity_long }}" + rgb_color: '{{ states(last_click_lightsettings).split(",") }}' + + + + + +##### ACTION - Page Lightsettings - Close Lightsetting Page ##### + - choose: + - conditions: + - condition: trigger + id: light_settings + - condition: template + value_template: '{{ states(last_click_lightsettings) == "releaselightsettingsclose" }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "{{ entity_back }}" + + + + + +################################################## +##### ACTION - Cover Setting Page ########################################################################################################################################################## +################################################## + + + + + +##### ACTION - Page Coversettings - JUMP to Page Coversettings and SYNC Cover Settings ##### + - choose: + - conditions: + - condition: trigger + id: long_press + sequence: + ##### send some current Values to Cover Setting page ##### + - if: + - condition: template + value_template: '{{ entity_long is match "cover." }}' + then: + - service: "{{ command_printf }}" + data: + cmd: page coversettings + - delay: + milliseconds: 2 + - service: "{{ command_value }}" + data: + component: coversettings.coverslider + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' + - delay: + milliseconds: 3 + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' + - delay: + milliseconds: 4 + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_name + message: '{{ entity_long_name }}' + ##### Cover PIC - open ##### + - if: + - condition: template + value_template: '{{ states(entity_long) == "open" }}' + then: + - delay: + milliseconds: 5 + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_open }} + ##### Cover PIC - Closed + - if: + - condition: template + value_template: '{{ states(entity_long) == "closed" }}' + then: + - delay: + milliseconds: 6 + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_closed }} + ##### Cover Battery ICON Yes / NO ##### + - if: + - condition: template + value_template: "{{ state_attr(entity_long, 'battery') != none }}" + then: + - delay: + milliseconds: 7 + - service: "{{ command_text_printf }}" + data: + component: coversettings.battery_value + message: '{{ (state_attr(entity_long, "battery") | int ) |round(0) }} %' + - service: "{{ command_printf }}" + data: + cmd: coversettings.battery_icon.pic={{ battery_icon }} + + + + + +##### ACTION - Page Coversettings - Changes from HA ##### + - choose: + - conditions: + - condition: trigger + id: + - current_state_entity01 + - current_state_entity02 + - current_state_entity03 + - current_state_entity04 + - current_state_entity05 + - current_state_entity06 + - current_state_entity07 + - current_state_entity08 + - current_state_entity09 + - current_state_entity10 + - current_state_entity11 + - current_state_entity12 + - current_state_entity13 + - current_state_entity14 + - current_state_entity15 + - current_state_entity16 + - current_state_entity17 + - current_state_entity18 + - current_state_entity19 + - current_state_entity20 + - current_state_entity21 + - current_state_entity22 + - current_state_entity23 + - current_state_entity24 + - current_state_entity25 + - current_state_entity26 + - current_state_entity27 + - current_state_entity28 + - current_state_entity29 + - current_state_entity30 + - current_state_entity31 + - current_state_entity32 + sequence: + ##### Cover PIC - open + - if: + - condition: template + value_template: '{{ states(entity_long) == "open" }}' + then: + - delay: + milliseconds: 1 + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_open }} + ##### Cover PIC - Closed ##### + - if: + - condition: template + value_template: '{{ states(entity_long) == "closed" }}' + then: + - delay: + milliseconds: 1 + - service: "{{ command_printf }}" + data: + cmd: coversettings.cover_status.pic={{ cover_pic_closed }} + ##### Cover Slider HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ entity_long is match "cover." and sync_slider_ha == "select_yes" }}' + then: + - delay: + milliseconds: 2 + - service: "{{ command_value }}" + data: + component: lightsettings.lightslider + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }}' + ##### Cover Value HA Sync - YES ##### + - if: + - condition: template + value_template: '{{ entity_long is match "cover." and sync_value_ha == "select_yes" }}' + then: + - delay: + milliseconds: 3 + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ (state_attr(entity_long, "current_position") | int ) |round(0) }} %' + + + + + +##### ACTION - Page Coversettings - Cover Slider MOVE ##### + - choose: + - conditions: + - condition: trigger + id: + - cover_settings + sequence: + - if: + - condition: template + value_template: '{{ states(last_click_coversettings) is match "coverposition\d+" }}' + then: + - service: cover.set_cover_position + data: + entity_id: "{{ entity_long }}" + position: '{{ states(last_click_coversettings) |replace("coverposition","") | int }}' + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value + message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' + - service: "{{ command_text_printf }}" + data: + component: coversettings.cover_value_2 + message: '{{ states(last_click_coversettings) |replace("coverposition","") | int }} %' + + + + + +##### ACTION - Page Coversettings - UP / DOWN / STOP Cover ##### + - choose: + - conditions: + - condition: trigger + id: cover_settings + sequence: + ##### COVER CLOSE Button ##### + - if: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_close_press" }}' + then: + - service: cover.close_cover + data: + entity_id: "{{ entity_long }}" + ##### COVER OPEN Button ##### + - if: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_open_press" }}' + then: + - service: cover.open_cover + data: + entity_id: "{{ entity_long }}" + ##### COVER STOP Button ##### + - if: + - condition: template + value_template: '{{ states(last_click_coversettings) == "cover_stop_press" }}' + then: + - service: cover.stop_cover + data: + entity_id: "{{ entity_long }}" + + + + + +##### ACTION - Page Coversettings - Close Coversettings ##### + - choose: + - conditions: + - condition: trigger + id: cover_settings + - condition: template + value_template: '{{ states(last_click_coversettings) == "releasecoversettingsclose" }}' + sequence: + - service: "{{ command_printf }}" + data: + cmd: "{{ entity_back }}" + + + + + +################################################## +##### ACTION - Cover Setting Page ########################################################################################################################################################## +################################################## + + + + + + +##### ACTION - TFT Upload Automation ##### + - choose: + - conditions: + - condition: trigger + id: tft_upload + sequence: + - delay: + seconds: 2 + - service: "{{ tft_upload }}" + data: {} + + ##### Humidity ##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_entities + - humidity_state + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a04 + message: "{{ states(humidity) |round(0) }}%" + + ##### Hotwater Temp ##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_entities + - hotwatertemp_state + - condition: template + value_template: '{{ hotwatertemp is match "sensor." }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a07 + message: "{{ states(hotwatertemp) |round(1) }}°" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a08 + message: "{{ states(hotwatertemp) |round(1) }}°" + - service: "{{ command_printf }}" + data: + cmd: home.p01.pic=68 + + ##### Outdoor Temp Entity ##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_entities + - outdoortemp_state + - condition: template + value_template: '{{ outdoortemp is match "sensor." }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: "{{ states(outdoortemp) |round(0) }}°" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: "{{ states(outdoortemp) |round(0) }}°" + + ##### Outdoor Temp Meteorologisk ##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_entities + - weather_update_time + - condition: template + value_template: '{{ outdoortemp == "default" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + + ##### Outdoor Temp AccuWeather ##### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_entities + - weather_update_time + - condition: template + value_template: '{{ outdoortemp == "accuweather" }}' + sequence: + - service: "{{ command_text_printf }}" + data: + component: home.a06 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + - service: "{{ command_text_printf }}" + data: + component: thermostat.a07 + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + + ##### Left Button - Toggle ##### + - choose: + - conditions: + - condition: trigger + id: left_button_press + sequence: + - service: >- + {% if left_button_entity is match 'light.' %} + light.toggle + {% elif left_button_entity is match 'switch.' %} + switch.toggle + {% elif left_button_entity is match 'cover.' %} + cover.toggle + {% elif left_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% endif %} + data: + entity_id: "{{ left_button_entity }}" + + ##### Right Button - Toggle ##### + - choose: + - conditions: + - condition: trigger + id: right_button_press + sequence: + - service: >- + {% if right_button_entity is match 'light.' %} + light.toggle + {% elif right_button_entity is match 'switch.' %} + switch.toggle + {% elif right_button_entity is match 'cover.' %} + cover.toggle + {% elif right_button_entity is match 'input_boolean.' %} + input_boolean.toggle + {% endif %} + data: + entity_id: "{{ right_button_entity }}" + + + + + + + + + ######################################### + # + # + ############################################################# + ##### CLOSE - START - Action ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - HA Button SYNC ##### + ############################################################# + # + # + ######################################### + + + + + +################################################################################ +####### buttonpage01.button01 ################################################################# +################################################################################ + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity01 + sequence: + ##### buttonpage01.button01 Design Light OFF ##### + - if: + - condition: template + value_template: '{{ entity01 is match "light." and states(entity01) == "off" }}' + then: + ##### Button LIGHT PIC - OFF ##### + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_light_off }} + ##### "TEXT" Background - Light OFF ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### "TEXT" Font Color - Light OFF ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### "BRIGHTNESS" Background Color - Light OFF ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### "BRIGHTNESS" Font Color - Light OFF ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### "TEXT" Name - Light OFF ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### "BRIGHTNESS" Text - Light OFF ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: " " + + + + ##### buttonpage01.button01 Design light ON ##### + - if: + - condition: template + value_template: '{{ entity01 is match "light." and states(entity01) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: '{{ (state_attr(entity01, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button01 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity01 is match "switch." and states(entity01) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: " " + ##### buttonpage01.button01 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity01 is match "switch." and states(entity01) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: " " + + ##### buttonpage01.button01 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity01 is match "input_boolean." and states(entity01) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: " " + ##### buttonpage01.button01 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity01 is match "input_boolean." and states(entity01) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: " " + + ##### buttonpage01.button01 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity01 is match "cover." and states(entity01) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: " " + ##### buttonpage01.button01 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity01 is match "cover." and states(entity01) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button01pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01text + message: "{{ entity01_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button01bri + message: '{{ (state_attr(entity01, "current_position") | int ) |round(0) }}%' + + +################################################################################ + ####### buttonpage01.button02 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage01.button02 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity02 + sequence: + - if: + - condition: template + value_template: '{{ entity02 is match "light." and states(entity02) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: " " + ##### buttonpage01.button02 light ON ##### + - if: + - condition: template + value_template: '{{ entity02 is match "light." and states(entity02) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: '{{ (state_attr(entity02, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button02 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity02 is match "switch." and states(entity02) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: " " + ##### buttonpage01.button02 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity02 is match "switch." and states(entity02) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: " " + + ##### buttonpage01.button02 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity02 is match "input_boolean." and states(entity02) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: " " + ##### buttonpage01.button02 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity02 is match "input_boolean." and states(entity02) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: " " + + ##### buttonpage01.button02 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity02 is match "cover." and states(entity02) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: " " + ##### buttonpage01.button02 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity02 is match "cover." and states(entity02) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button02pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02text + message: "{{ entity02_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button02bri + message: '{{ (state_attr(entity02, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage01.button03 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage01.button03 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity03 + sequence: + - if: + - condition: template + value_template: '{{ entity03 is match "light." and states(entity03) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: " " + ##### buttonpage01.button03 light ON ##### + - if: + - condition: template + value_template: '{{ entity03 is match "light." and states(entity03) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: '{{ (state_attr(entity03, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button03 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity03 is match "switch." and states(entity03) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: " " + ##### buttonpage01.button03 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity03 is match "switch." and states(entity03) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: " " + + ##### buttonpage01.button03 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity03 is match "input_boolean." and states(entity03) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: " " + ##### buttonpage01.button03 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity03 is match "input_boolean." and states(entity03) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: " " + + ##### buttonpage01.button03 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity03 is match "cover." and states(entity03) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: " " + ##### buttonpage01.button03 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity03 is match "cover." and states(entity03) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button03pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03text + message: "{{ entity03_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button03bri + message: '{{ (state_attr(entity03, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage01.button04 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage01.button04 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity04 + sequence: + - if: + - condition: template + value_template: '{{ entity04 is match "light." and states(entity04) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: " " + ##### buttonpage01.button04 light ON ##### + - if: + - condition: template + value_template: '{{ entity04 is match "light." and states(entity04) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: '{{ (state_attr(entity04, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button04 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity04 is match "switch." and states(entity04) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: " " + ##### buttonpage01.button04 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity04 is match "switch." and states(entity04) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: " " + + ##### buttonpage01.button04 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity04 is match "input_boolean." and states(entity04) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: " " + ##### buttonpage01.button04 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity04 is match "input_boolean." and states(entity04) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: " " + + ##### buttonpage01.button04 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity04 is match "cover." and states(entity04) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: " " + ##### buttonpage01.button04 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity04 is match "cover." and states(entity04) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button04pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04text + message: "{{ entity04_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button04bri + message: '{{ (state_attr(entity04, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage01.button05 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage01.button05 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity05 + sequence: + - if: + - condition: template + value_template: '{{ entity05 is match "light." and states(entity05) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: " " + ##### buttonpage01.button05 light ON ##### + - if: + - condition: template + value_template: '{{ entity05 is match "light." and states(entity05) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: '{{ (state_attr(entity05, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button05 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity05 is match "switch." and states(entity05) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: " " + ##### buttonpage01.button05 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity05 is match "switch." and states(entity05) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: " " + + ##### buttonpage01.button05 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity05 is match "input_boolean." and states(entity05) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: " " + ##### buttonpage01.button05 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity05 is match "input_boolean." and states(entity05) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: " " + + ##### buttonpage01.button05 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity05 is match "cover." and states(entity05) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: " " + ##### buttonpage01.button05 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity05 is match "cover." and states(entity05) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button05pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05text + message: "{{ entity05_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button05bri + message: '{{ (state_attr(entity05, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage01.button06 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage01.button06 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity06 + sequence: + - if: + - condition: template + value_template: '{{ entity06 is match "light." and states(entity06) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: " " + ##### buttonpage01.button06 light ON ##### + - if: + - condition: template + value_template: '{{ entity06 is match "light." and states(entity06) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: '{{ (state_attr(entity06, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button06 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity06 is match "switch." and states(entity06) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: " " + ##### buttonpage01.button06 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity06 is match "switch." and states(entity06) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: " " + + ##### buttonpage01.button06 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity06 is match "input_boolean." and states(entity06) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: " " + ##### buttonpage01.button06 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity06 is match "input_boolean." and states(entity06) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: " " + + ##### buttonpage01.button06 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity06 is match "cover." and states(entity06) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: " " + ##### buttonpage01.button06 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity06 is match "cover." and states(entity06) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button06pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06text + message: "{{ entity06_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button06bri + message: '{{ (state_attr(entity06, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage01.button07 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage01.button07 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity07 + sequence: + - if: + - condition: template + value_template: '{{ entity07 is match "light." and states(entity07) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: " " + ##### buttonpage01.button07 light ON ##### + - if: + - condition: template + value_template: '{{ entity07 is match "light." and states(entity07) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: '{{ (state_attr(entity07, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button07 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity07 is match "switch." and states(entity07) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: " " + ##### buttonpage01.button07 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity07 is match "switch." and states(entity07) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: " " + + ##### buttonpage01.button07 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity07 is match "input_boolean." and states(entity07) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: " " + ##### buttonpage01.button07 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity07 is match "input_boolean." and states(entity07) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: " " + + ##### buttonpage01.button07 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity07 is match "cover." and states(entity07) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: " " + ##### buttonpage01.button07 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity07 is match "cover." and states(entity07) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button07pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07text + message: "{{ entity07_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button07bri + message: '{{ (state_attr(entity07, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage01.button08 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage01.button08 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage01 + - current_state_entity08 + sequence: + - if: + - condition: template + value_template: '{{ entity08 is match "light." and states(entity08) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: " " + ##### buttonpage01.button08 light ON ##### + - if: + - condition: template + value_template: '{{ entity08 is match "light." and states(entity08) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: '{{ (state_attr(entity08, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage01.button08 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity08 is match "switch." and states(entity08) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: " " + ##### buttonpage01.button08 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity08 is match "switch." and states(entity08) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: " " + + ##### buttonpage01.button08 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity08 is match "input_boolean." and states(entity08) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: " " + ##### buttonpage01.button08 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity08 is match "input_boolean." and states(entity08) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: " " + + ##### buttonpage01.button08 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity08 is match "cover." and states(entity08) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: " " + ##### buttonpage01.button08 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity08 is match "cover." and states(entity08) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage01.button08pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage01.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08text + message: "{{ entity08_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage01.button08bri + message: '{{ (state_attr(entity08, "current_position") | int ) |round(0) }}%' + +######################################################################################################################## + +################################################################################ + ####### buttonpage02.button01 ################################################################# +################################################################################ + - choose: + ##### buttonpage02.button01 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity09 + sequence: + - if: + - condition: template + value_template: '{{ entity09 is match "light." and states(entity09) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: " " + ##### buttonpage02.button01 light ON ##### + - if: + - condition: template + value_template: '{{ entity09 is match "light." and states(entity09) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: '{{ (state_attr(entity09, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button01 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity09 is match "switch." and states(entity09) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: " " + ##### buttonpage02.button01 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity09 is match "switch." and states(entity09) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: " " + + ##### buttonpage02.button01 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity09 is match "input_boolean." and states(entity09) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: " " + ##### buttonpage02.button01 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity09 is match "input_boolean." and states(entity09) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: " " + + ##### buttonpage02.button01 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity09 is match "cover." and states(entity09) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: " " + ##### buttonpage02.button01 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity09 is match "cover." and states(entity09) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button01pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01text + message: "{{ entity09_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button01bri + message: '{{ (state_attr(entity09, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage02.button02 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage02.button02 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity10 + sequence: + - if: + - condition: template + value_template: '{{ entity10 is match "light." and states(entity10) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: " " + ##### buttonpage02.button02 light ON ##### + - if: + - condition: template + value_template: '{{ entity10 is match "light." and states(entity10) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: '{{ (state_attr(entity10, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button02 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity10 is match "switch." and states(entity10) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: " " + ##### buttonpage02.button02 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity10 is match "switch." and states(entity10) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: " " + + ##### buttonpage02.button02 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity10 is match "input_boolean." and states(entity10) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: " " + ##### buttonpage02.button02 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity10 is match "input_boolean." and states(entity10) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: " " + + ##### buttonpage02.button02 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity10 is match "cover." and states(entity10) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: " " + ##### buttonpage02.button02 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity10 is match "cover." and states(entity10) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button02pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02text + message: "{{ entity10_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button02bri + message: '{{ (state_attr(entity10, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage02.button03 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage02.button03 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity11 + sequence: + - if: + - condition: template + value_template: '{{ entity11 is match "light." and states(entity11) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: " " + ##### buttonpage02.button03 light ON ##### + - if: + - condition: template + value_template: '{{ entity11 is match "light." and states(entity11) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: '{{ (state_attr(entity11, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button03 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity11 is match "switch." and states(entity11) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: " " + ##### buttonpage02.button03 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity11 is match "switch." and states(entity11) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: " " + + ##### buttonpage02.button03 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity11 is match "input_boolean." and states(entity11) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: " " + ##### buttonpage02.button03 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity11 is match "input_boolean." and states(entity11) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: " " + + ##### buttonpage02.button03 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity11 is match "cover." and states(entity11) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: " " + ##### buttonpage02.button03 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity11 is match "cover." and states(entity11) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button03pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03text + message: "{{ entity11_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button03bri + message: '{{ (state_attr(entity11, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage02.button04 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage02.button04 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity12 + sequence: + - if: + - condition: template + value_template: '{{ entity12 is match "light." and states(entity12) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: " " + ##### buttonpage02.button04 light ON ##### + - if: + - condition: template + value_template: '{{ entity12 is match "light." and states(entity12) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: '{{ (state_attr(entity12, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button04 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity12 is match "switch." and states(entity12) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: " " + ##### buttonpage02.button04 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity12 is match "switch." and states(entity12) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: " " + + ##### buttonpage02.button04 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity12 is match "input_boolean." and states(entity12) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: " " + ##### buttonpage02.button04 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity12 is match "input_boolean." and states(entity12) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: " " + + ##### buttonpage02.button04 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity12 is match "cover." and states(entity12) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: " " + ##### buttonpage02.button04 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity12 is match "cover." and states(entity12) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button04pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04text + message: "{{ entity12_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button04bri + message: '{{ (state_attr(entity12, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage02.button05 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage02.button05 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity13 + sequence: + - if: + - condition: template + value_template: '{{ entity13 is match "light." and states(entity13) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: " " + ##### buttonpage02.button05 light ON ##### + - if: + - condition: template + value_template: '{{ entity13 is match "light." and states(entity13) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: '{{ (state_attr(entity13, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button05 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity13 is match "switch." and states(entity13) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: " " + ##### buttonpage02.button05 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity13 is match "switch." and states(entity13) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: " " + + ##### buttonpage02.button05 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity13 is match "input_boolean." and states(entity13) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: " " + ##### buttonpage02.button05 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity13 is match "input_boolean." and states(entity13) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: " " + + ##### buttonpage02.button05 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity13 is match "cover." and states(entity13) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: " " + ##### buttonpage02.button05 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity13 is match "cover." and states(entity13) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button05pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05text + message: "{{ entity13_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button05bri + message: '{{ (state_attr(entity13, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage02.button06 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage02.button06 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity14 + sequence: + - if: + - condition: template + value_template: '{{ entity14 is match "light." and states(entity14) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: " " + ##### buttonpage02.button06 light ON ##### + - if: + - condition: template + value_template: '{{ entity14 is match "light." and states(entity14) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: '{{ (state_attr(entity14, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button06 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity14 is match "switch." and states(entity14) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: " " + ##### buttonpage02.button06 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity14 is match "switch." and states(entity14) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: " " + + ##### buttonpage02.button06 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity14 is match "input_boolean." and states(entity14) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: " " + ##### buttonpage02.button06 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity14 is match "input_boolean." and states(entity14) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: " " + + ##### buttonpage02.button06 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity14 is match "cover." and states(entity14) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: " " + ##### buttonpage02.button06 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity14 is match "cover." and states(entity14) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button06pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06text + message: "{{ entity14_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button06bri + message: '{{ (state_attr(entity14, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage02.button07 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage02.button07 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity15 + sequence: + - if: + - condition: template + value_template: '{{ entity15 is match "light." and states(entity15) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: " " + ##### buttonpage02.button07 light ON ##### + - if: + - condition: template + value_template: '{{ entity15 is match "light." and states(entity15) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: '{{ (state_attr(entity15, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button07 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity15 is match "switch." and states(entity15) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: " " + ##### buttonpage02.button07 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity15 is match "switch." and states(entity15) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: " " + + ##### buttonpage02.button07 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity15 is match "input_boolean." and states(entity15) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: " " + ##### buttonpage02.button07 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity15 is match "input_boolean." and states(entity15) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: " " + + ##### buttonpage02.button07 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity15 is match "cover." and states(entity15) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: " " + ##### buttonpage02.button07 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity15 is match "cover." and states(entity15) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button07pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07text + message: "{{ entity15_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button07bri + message: '{{ (state_attr(entity15, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage02.button08 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage02.button08 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage02 + - current_state_entity16 + sequence: + - if: + - condition: template + value_template: '{{ entity16 is match "light." and states(entity16) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: " " + ##### buttonpage02.button08 light ON ##### + - if: + - condition: template + value_template: '{{ entity16 is match "light." and states(entity16) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: '{{ (state_attr(entity16, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage02.button08 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity16 is match "switch." and states(entity16) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: " " + ##### buttonpage02.button08 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity16 is match "switch." and states(entity16) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: " " + + ##### buttonpage02.button08 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity16 is match "input_boolean." and states(entity16) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: " " + ##### buttonpage02.button08 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity16 is match "input_boolean." and states(entity16) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: " " + + ##### buttonpage02.button08 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity16 is match "cover." and states(entity16) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: " " + ##### buttonpage02.button08 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity16 is match "cover." and states(entity16) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage02.button08pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage02.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08text + message: "{{ entity16_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage02.button08bri + message: '{{ (state_attr(entity16, "current_position") | int ) |round(0) }}%' + +######################################################################################################################## + +################################################################################ + ####### buttonpage03.button01 ################################################################# +################################################################################ + - choose: + ##### buttonpage03.button01 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity17 + sequence: + - if: + - condition: template + value_template: '{{ entity17 is match "light." and states(entity17) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: " " + ##### buttonpage03.button01 light ON ##### + - if: + - condition: template + value_template: '{{ entity17 is match "light." and states(entity17) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: '{{ (state_attr(entity17, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button01 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity17 is match "switch." and states(entity17) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: " " + ##### buttonpage03.button01 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity17 is match "switch." and states(entity17) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: " " + + ##### buttonpage03.button01 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity17 is match "input_boolean." and states(entity17) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: " " + ##### buttonpage03.button01 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity17 is match "input_boolean." and states(entity17) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: " " + + ##### buttonpage03.button01 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity17 is match "cover." and states(entity17) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: " " + ##### buttonpage03.button01 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity17 is match "cover." and states(entity17) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button01pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01text + message: "{{ entity17_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button01bri + message: '{{ (state_attr(entity17, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage03.button02 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage03.button02 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity18 + sequence: + - if: + - condition: template + value_template: '{{ entity18 is match "light." and states(entity18) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: " " + ##### buttonpage03.button02 light ON ##### + - if: + - condition: template + value_template: '{{ entity18 is match "light." and states(entity18) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: '{{ (state_attr(entity18, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button02 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity18 is match "switch." and states(entity18) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: " " + ##### buttonpage03.button02 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity18 is match "switch." and states(entity18) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: " " + + ##### buttonpage03.button02 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity18 is match "input_boolean." and states(entity18) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: " " + ##### buttonpage03.button02 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity18 is match "input_boolean." and states(entity18) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: " " + + ##### buttonpage03.button02 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity18 is match "cover." and states(entity18) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: " " + ##### buttonpage03.button02 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity18 is match "cover." and states(entity18) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button02pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02text + message: "{{ entity18_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button02bri + message: '{{ (state_attr(entity18, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage03.button03 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage03.button03 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity19 + sequence: + - if: + - condition: template + value_template: '{{ entity19 is match "light." and states(entity19) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: " " + ##### buttonpage03.button03 light ON ##### + - if: + - condition: template + value_template: '{{ entity19 is match "light." and states(entity19) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: '{{ (state_attr(entity19, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button03 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity19 is match "switch." and states(entity19) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: " " + ##### buttonpage03.button03 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity19 is match "switch." and states(entity19) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: " " + + ##### buttonpage03.button03 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity19 is match "input_boolean." and states(entity19) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: " " + ##### buttonpage03.button03 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity19 is match "input_boolean." and states(entity19) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: " " + + ##### buttonpage03.button03 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity19 is match "cover." and states(entity19) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: " " + ##### buttonpage03.button03 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity19 is match "cover." and states(entity19) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button03pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03text + message: "{{ entity19_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button03bri + message: '{{ (state_attr(entity19, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage03.button04 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage03.button04 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity20 + sequence: + - if: + - condition: template + value_template: '{{ entity20 is match "light." and states(entity20) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: " " + ##### buttonpage03.button04 light ON ##### + - if: + - condition: template + value_template: '{{ entity20 is match "light." and states(entity20) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: '{{ (state_attr(entity20, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button04 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity20 is match "switch." and states(entity20) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: " " + ##### buttonpage03.button04 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity20 is match "switch." and states(entity20) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: " " + + ##### buttonpage03.button04 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity20 is match "input_boolean." and states(entity20) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: " " + ##### buttonpage03.button04 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity20 is match "input_boolean." and states(entity20) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: " " + + ##### buttonpage03.button04 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity20 is match "cover." and states(entity20) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: " " + ##### buttonpage03.button04 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity20 is match "cover." and states(entity20) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button04pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04text + message: "{{ entity20_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button04bri + message: '{{ (state_attr(entity20,"current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage03.button05 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage03.button05 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity21 + sequence: + - if: + - condition: template + value_template: '{{ entity21 is match "light." and states(entity21) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: " " + ##### buttonpage03.button05 light ON ##### + - if: + - condition: template + value_template: '{{ entity21 is match "light." and states(entity21) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: '{{ (state_attr(entity21, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button05 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity21 is match "switch." and states(entity21) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: " " + ##### buttonpage03.button05 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity21 is match "switch." and states(entity21) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: " " + + ##### buttonpage03.button05 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity21 is match "input_boolean." and states(entity21) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: " " + ##### buttonpage03.button05 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity21 is match "input_boolean." and states(entity21) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: " " + + ##### buttonpage03.button05 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity21 is match "cover." and states(entity21) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: " " + ##### buttonpage03.button05 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity21 is match "cover." and states(entity21) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button05pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05text + message: "{{ entity21_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button05bri + message: '{{ (state_attr(entity21, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage03.button06 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage03.button06 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity22 + sequence: + - if: + - condition: template + value_template: '{{ entity22 is match "light." and states(entity22) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: " " + ##### buttonpage03.button06 light ON ##### + - if: + - condition: template + value_template: '{{ entity22 is match "light." and states(entity22) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: '{{ (state_attr(entity22, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button06 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity22 is match "switch." and states(entity22) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: " " + ##### buttonpage03.button06 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity22 is match "switch." and states(entity22) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: " " + + ##### buttonpage03.button06 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity22 is match "input_boolean." and states(entity22) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: " " + ##### buttonpage03.button06 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity22 is match "input_boolean." and states(entity22) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: " " + + ##### buttonpage03.button06 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity22 is match "cover." and states(entity22) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: " " + ##### buttonpage03.button06 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity22 is match "cover." and states(entity22) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button06pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06text + message: "{{ entity22_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button06bri + message: '{{ (state_attr(entity22, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage03.button07 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage03.button07 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity23 + sequence: + - if: + - condition: template + value_template: '{{ entity23 is match "light." and states(entity23) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: " " + ##### buttonpage03.button07 light ON ##### + - if: + - condition: template + value_template: '{{ entity23 is match "light." and states(entity23) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: '{{ (state_attr(entity23, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button07 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity23 is match "switch." and states(entity23) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: " " + ##### buttonpage03.button07 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity23 is match "switch." and states(entity23) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: " " + + ##### buttonpage03.button07 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity23 is match "input_boolean." and states(entity23) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: " " + ##### buttonpage03.button07 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity23 is match "input_boolean." and states(entity23) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: " " + + ##### buttonpage03.button07 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity23 is match "cover." and states(entity23) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: " " + ##### buttonpage03.button07 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity23 is match "cover." and states(entity23) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button07pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07text + message: "{{ entity23_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button07bri + message: '{{ (state_attr(entity23, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage03.button08 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage03.button08 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage03 + - current_state_entity24 + sequence: + - if: + - condition: template + value_template: '{{ entity24 is match "light." and states(entity24) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: " " + ##### buttonpage03.button08 light ON ##### + - if: + - condition: template + value_template: '{{ entity24 is match "light." and states(entity24) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: '{{ (state_attr(entity24, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage03.button08 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity24 is match "switch." and states(entity24) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: " " + ##### buttonpage03.button08 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity24 is match "switch." and states(entity24) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: " " + + ##### buttonpage03.button08 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity24 is match "input_boolean." and states(entity24) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: " " + ##### buttonpage03.button08 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity24 is match "input_boolean." and states(entity24) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: " " + + ##### buttonpage03.button08 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity24 is match "cover." and states(entity24) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: " " + ##### buttonpage03.button08 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity24 is match "cover." and states(entity24) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage03.button08pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage03.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08text + message: "{{ entity24_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage03.button08bri + message: '{{ (state_attr(entity24, "current_position") | int ) |round(0) }}%' + +######################################################################################################################## + +################################################################################ + ####### buttonpage04.button01 ################################################################# +################################################################################ + - choose: + ##### buttonpage04.button01 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity25 + sequence: + - if: + - condition: template + value_template: '{{ entity25 is match "light." and states(entity25) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: " " + ##### buttonpage04.button01 light ON ##### + - if: + - condition: template + value_template: '{{ entity25 is match "light." and states(entity25) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: '{{ (state_attr(entity25, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button01 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity25 is match "switch." and states(entity25) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: " " + ##### buttonpage04.button01 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity25 is match "switch." and states(entity25) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: " " + + ##### buttonpage04.button01 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity25 is match "input_boolean." and states(entity25) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: " " + ##### buttonpage04.button01 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity25 is match "input_boolean." and states(entity25) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: " " + + ##### buttonpage04.button01 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity25 is match "cover." and states(entity25) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: " " + ##### buttonpage04.button01 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity25 is match "cover." and states(entity25) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button01pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button01bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01text + message: "{{ entity25_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button01bri + message: '{{ (state_attr(entity25, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage04.button02 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage04.button02 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity26 + sequence: + - if: + - condition: template + value_template: '{{ entity26 is match "light." and states(entity26) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: " " + ##### buttonpage04.button02 light ON ##### + - if: + - condition: template + value_template: '{{ entity26 is match "light." and states(entity26) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: '{{ (state_attr(entity26, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button02 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity26 is match "switch." and states(entity26) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: " " + ##### buttonpage04.button02 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity26 is match "switch." and states(entity26) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: " " + + ##### buttonpage04.button02 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity26 is match "input_boolean." and states(entity26) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: " " + ##### buttonpage04.button02 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity26 is match "input_boolean." and states(entity26) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: " " + + ##### buttonpage04.button02 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity26 is match "cover." and states(entity26) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: " " + ##### buttonpage04.button02 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity26 is match "cover." and states(entity26) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button02pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button02bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02text + message: "{{ entity26_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button02bri + message: '{{ (state_attr(entity26, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage04.button03 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage04.button03 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity27 + sequence: + - if: + - condition: template + value_template: '{{ entity27 is match "light." and states(entity27) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: " " + ##### buttonpage04.button03 light ON ##### + - if: + - condition: template + value_template: '{{ entity27 is match "light." and states(entity27) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: '{{ (state_attr(entity27, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button03 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity27 is match "switch." and states(entity27) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: " " + ##### buttonpage04.button03 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity27 is match "switch." and states(entity27) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: " " + + ##### buttonpage04.button03 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity27 is match "input_boolean." and states(entity27) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: " " + ##### buttonpage04.button03 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity27 is match "input_boolean." and states(entity27) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: " " + + ##### buttonpage04.button03 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity27 is match "cover." and states(entity27) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: " " + ##### buttonpage04.button03 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity27 is match "cover." and states(entity27) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button03pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button03bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03text + message: "{{ entity27_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button03bri + message: '{{ (state_attr(entity27, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage04.button04 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage04.button04 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity28 + sequence: + - if: + - condition: template + value_template: '{{ entity28 is match "light." and states(entity28) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: " " + ##### buttonpage04.button04 light ON ##### + - if: + - condition: template + value_template: '{{ entity28 is match "light." and states(entity28) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: '{{ (state_attr(entity28, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button04 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity28 is match "switch." and states(entity28) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: " " + ##### buttonpage04.button04 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity28 is match "switch." and states(entity28) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: " " + + ##### buttonpage04.button04 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity28 is match "input_boolean." and states(entity28) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: " " + ##### buttonpage04.button04 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity28 is match "input_boolean." and states(entity28) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: " " + + ##### buttonpage04.button04 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity28 is match "cover." and states(entity28) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: " " + ##### buttonpage04.button04 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity28 is match "cover." and states(entity28) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button04pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button04bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04text + message: "{{ entity28_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button04bri + message: '{{ (state_attr(entity28, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage04.button05 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage04.button05 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity29 + sequence: + - if: + - condition: template + value_template: '{{ entity29 is match "light." and states(entity29) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: " " + ##### buttonpage04.button05 light ON ##### + - if: + - condition: template + value_template: '{{ entity29 is match "light." and states(entity29) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: '{{ (state_attr(entity29, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button05 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity29 is match "switch." and states(entity29) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: " " + ##### buttonpage04.button05 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity29 is match "switch." and states(entity29) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: " " + + ##### buttonpage04.button05 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity29 is match "input_boolean." and states(entity29) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: " " + ##### buttonpage04.button05 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity29 is match "input_boolean." and states(entity29) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: " " + + ##### buttonpage04.button05 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity29 is match "cover." and states(entity29) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: " " + ##### buttonpage04.button05 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity29 is match "cover." and states(entity29) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button05pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button05bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05text + message: "{{ entity29_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button05bri + message: '{{ (state_attr(entity29, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage04.button06 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage04.button06 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity30 + sequence: + - if: + - condition: template + value_template: '{{ entity30 is match "light." and states(entity30) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: " " + ##### buttonpage04.button06 light ON ##### + - if: + - condition: template + value_template: '{{ entity30 is match "light." and states(entity30) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: '{{ (state_attr(entity30, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button06 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity30 is match "switch." and states(entity30) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: " " + ##### buttonpage04.button06 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity30 is match "switch." and states(entity30) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: " " + + ##### buttonpage04.button06 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity30 is match "input_boolean." and states(entity30) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: " " + ##### buttonpage04.button06 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity30 is match "input_boolean." and states(entity30) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: " " + + ##### buttonpage04.button06 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity30 is match "cover." and states(entity30) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: " " + ##### buttonpage04.button06 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity30 is match "cover." and states(entity30) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button06pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button06bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06text + message: "{{ entity30_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button06bri + message: '{{ (state_attr(entity30, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage04.button07 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage04.button07 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity31 + sequence: + - if: + - condition: template + value_template: '{{ entity31 is match "light." and states(entity31) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: " " + ##### buttonpage04.button07 light ON ##### + - if: + - condition: template + value_template: '{{ entity31 is match "light." and states(entity31) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: '{{ (state_attr(entity31, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button07 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity31 is match "switch." and states(entity31) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: " " + ##### buttonpage04.button07 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity31 is match "switch." and states(entity31) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: " " + + ##### buttonpage04.button07 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity31 is match "input_boolean." and states(entity31) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: " " + ##### buttonpage04.button07 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity31 is match "input_boolean." and states(entity31) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: " " + + ##### buttonpage04.button07 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity31 is match "cover." and states(entity31) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: " " + ##### buttonpage04.button07 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity31 is match "cover." and states(entity31) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button07pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button07bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07text + message: "{{ entity31_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button07bri + message: '{{ (state_attr(entity31, "current_position") | int ) |round(0) }}%' + +################################################################################ + ####### buttonpage04.button08 ######################################################################################## +################################################################################ + - choose: + ##### buttonpage04.button08 Light OFF ##### + - conditions: + - condition: trigger + id: + - nspanel_boot_buttonpage04 + - current_state_entity32 + sequence: + - if: + - condition: template + value_template: '{{ entity32 is match "light." and states(entity32) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_light_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: " " + ##### buttonpage04.button08 light ON ##### + - if: + - condition: template + value_template: '{{ entity32 is match "light." and states(entity32) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_light_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: '{{ (state_attr(entity32, "brightness") | int * 100 / 254) |round(0) }}%' + + ##### buttonpage04.button08 Switch OFF ##### + - if: + - condition: template + value_template: '{{ entity32 is match "switch." and states(entity32) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: " " + ##### buttonpage04.button08 Switch ON ##### + - if: + - condition: template + value_template: '{{ entity32 is match "switch." and states(entity32) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: " " + + ##### buttonpage04.button08 Input Boolean OFF ##### + - if: + - condition: template + value_template: '{{ entity32 is match "input_boolean." and states(entity32) == "off" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_switch_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: " " + ##### buttonpage04.button08 Input Boolean ON ##### + - if: + - condition: template + value_template: '{{ entity32 is match "input_boolean." and states(entity32) == "on" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_switch_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: " " + + ##### buttonpage04.button08 Cover OFF ##### + - if: + - condition: template + value_template: '{{ entity32 is match "cover." and states(entity32) == "closed" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_cover_off }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: " " + ##### buttonpage04.button08 Cover ON ##### + - if: + - condition: template + value_template: '{{ entity32 is match "cover." and states(entity32) == "open" }}' + then: + - service: "{{ command_printf }}" + data: + cmd: buttonpage04.button08pic.pic={{ button_cover_on }} + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08text + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_background_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_1 }}" + ##### + - service: "{{ command_font_color }}" + data: + component: buttonpage04.button08bri + message: "{{ button_color_2 }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08text + message: "{{ entity32_name }}" + ##### + - service: "{{ command_text_printf }}" + data: + component: buttonpage04.button08bri + message: '{{ (state_attr(entity32, "current_position") | int ) |round(0) }}%' + + ######################################### + # + # + ############################################################# + ##### CLOSE - HA Button SYNC ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - Weather Forcast Meteorologisk HA Default ##### + ############################################################# + # + # + ######################################### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_weather + - weather_update_state + - weather_update_time + - condition: template + value_template: '{{ weather == "Default" }}' + +##### Weather Home Page Symbole Home Meteorologisk HA Default ##### + sequence: + - if: + - condition: template + value_template: "{{states(ha_weather) == 'sunny'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=2 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'cloudy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=3 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'rainy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=4 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'pouring'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=5 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'snowy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=6 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'hail'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=7 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'snowy-rainy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=7 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'fog'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=8 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'windy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=9 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'windy-variant'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=9 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'lightning'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=10 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'above_horizon' }}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=11 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'partlycloudy' and states('sun.sun') == 'below_horizon' }}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=12 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'above_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=13 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'lightning-rainy' and states('sun.sun') == 'below_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=14 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'execptional' and states('sun.sun') == 'above_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=13 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'execptional' and states('sun.sun') == 'below_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=14 + - if: + - condition: template + value_template: "{{states(ha_weather) == 'clear-night'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=15 + +##### Weather Forcast Today Symbole Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[0].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=15 + +##### Weather Forcast Day 1 Symbole Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[1].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=15 + +##### Weather Forcast Day 2 Symbole Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[2].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=15 + +##### Weather Forcast Day 3 Symbole Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[3].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=15 + +##### Weather Forcast Day 4 Symbole Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(ha_weather,"forecast")[4].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=15 + +##### Weather Forcast Today "TEMP" Home Meteorologisk HA Default ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a04 ### Temperature MIN ### + message: " " + - service: "{{ command_text_printf }}" + data: + component: weather01.a05 ### Temperature MAX ### + message: '{{state_attr(ha_weather,"temperature") | round(0)}}°' + +##### Weather Forcast Day 1 "TEMP" Home Meteorologisk HA Default ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a04 ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[1].templow | round(0)}}°' + - service: "{{ command_text_printf }}" + data: + component: weather02.a05 ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[1].temperature | round(0)}}°' + +##### Weather Forcast Day 2 "TEMP" Home Meteorologisk HA Default ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a04 ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[2].templow | round(0)}}°' + - service: "{{ command_text_printf }}" + data: + component: weather03.a05 ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[2].temperature | round(0)}}°' + +##### Weather Forcast Day 3 "TEMP" Home Meteorologisk HA Default ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a04 ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[3].templow | round(0)}}°' + - service: "{{ command_text_printf }}" + data: + component: weather04.a05 ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[3].temperature | round(0)}}°' + +##### Weather Forcast Day 4 "TEMP" Home Meteorologisk HA Default ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a04 ### Temperature MIN ### + message: '{{state_attr(ha_weather,"forecast")[4].templow | round(0)}}°' + - service: "{{ command_text_printf }}" + data: + component: weather05.a05 ### Temperature MAX ### + message: '{{state_attr(ha_weather,"forecast")[4].temperature | round(0)}}°' + +################################################################################ +##### Weather Forcast Details Home Meteorologisk HA Default ################################### +################################################################################ + - choose: + - conditions: + - condition: trigger + id: weather_update_state + - condition: template + value_template: '{{ weather == "Default" }}' + +##### Weather Forcast Today "Details" Home Meteorologisk HA Default ##### + sequence: + - if: + - condition: template + value_template: '{{states(last_click) == "weather01"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a06 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather01.p06.pic=53 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a07 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather01.p07.pic=53 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a08 + message: '{{state_attr(ha_weather,"wind_speed") | round(0)}} km/h' + - service: "{{ command_printf }}" + data: + cmd: weather01.p08.pic=63 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a09 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather01.p09.pic=53 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a10 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather01.p10.pic=53 + +##### Weather Forcast Day 1 "Details" Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather02"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a06 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather02.p06.pic=53 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a07 + message: '{{state_attr(ha_weather,"forecast")[0].precipitation| round(1)}} mm' + - service: "{{ command_printf }}" + data: + cmd: weather02.p07.pic=59 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a08 + message: '{{state_attr(ha_weather,"forecast")[0].wind_speed | round(0)}} km/h' + - service: "{{ command_printf }}" + data: + cmd: weather02.p08.pic=63 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a09 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather02.p09.pic=53 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a10 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather02.p10.pic=53 + +##### Weather Forcast Day 2 "Details" Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather03"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a06 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather03.p06.pic=53 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a07 + message: '{{state_attr(ha_weather,"forecast")[1].precipitation| round(1)}} mm' + - service: "{{ command_printf }}" + data: + cmd: weather03.p07.pic=59 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a08 + message: '{{state_attr(ha_weather,"forecast")[1].wind_speed | round(0)}} km/h' + - service: "{{ command_printf }}" + data: + cmd: weather03.p08.pic=63 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a09 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather03.p09.pic=53 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a10 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather03.p10.pic=53 + +##### Weather Forcast Day 3 "Details" Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather04"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a06 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather04.p06.pic=53 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a07 + message: '{{state_attr(ha_weather,"forecast")[2].precipitation| round(1)}} mm' + - service: "{{ command_printf }}" + data: + cmd: weather04.p07.pic=59 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a08 + message: '{{state_attr(ha_weather,"forecast")[2].wind_speed | round(0)}} km/h' + - service: "{{ command_printf }}" + data: + cmd: weather04.p08.pic=63 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a09 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather04.p09.pic=53 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a10 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather04.p10.pic=53 + +##### Weather Forcast Day 4 "Details" Home Meteorologisk HA Default ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather05"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a06 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather05.p06.pic=53 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a07 + message: '{{state_attr(ha_weather,"forecast")[3].precipitation| round(1)}} mm' + - service: "{{ command_printf }}" + data: + cmd: weather05.p07.pic=59 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a08 + message: '{{state_attr(ha_weather,"forecast")[3].wind_speed | round(0)}} km/h' + - service: "{{ command_printf }}" + data: + cmd: weather05.p08.pic=63 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a09 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather05.p09.pic=53 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a10 + message: " " + - service: "{{ command_printf }}" + data: + cmd: weather05.p10.pic=53 + + ######################################### + # + # + ############################################################# + ##### CLOSE - Weather Forcast Meteorologisk HA Default ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - Weather Forcast AccuWeather ##### + ############################################################# + # + # + ######################################### + - choose: + - conditions: + - condition: trigger + id: + - nspanel_boot_weather + - weather_update_state + - weather_update_time + - condition: template + value_template: '{{ weather == "AccuWeather" }}' + +##### Weather Home Page Symbole Home "AccuWeather" ##### + sequence: + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'sunny'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=2 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'cloudy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=3 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'rainy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=4 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'pouring'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=5 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'snowy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=6 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'hail'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=7 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'snowy-rainy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=7 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'fog'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=8 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'windy'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=9 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'windy-variant'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=9 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'lightning'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=10 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'partlycloudy' and states('sun.sun') == 'above_horizon' }}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=11 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'partlycloudy' and states('sun.sun') == 'below_horizon' }}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=12 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'lightning-rainy' and states('sun.sun') == 'above_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=13 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'lightning-rainy' and states('sun.sun') == 'below_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=14 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'execptional' and states('sun.sun') == 'above_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=13 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'execptional' and states('sun.sun') == 'below_horizon'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=14 + - if: + - condition: template + value_template: "{{states(accuweather_home) == 'clear-night'}}" + then: + - service: "{{ command_printf }}" + data: + cmd: home.a05.pic=15 + +##### Weather Forcast Today Symbole "AccuWeather" ##### + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[0].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather01.a03.pic=15 + +##### Weather Forcast Day 1 Symbole "AccuWeather" ##### + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[1].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather02.a03.pic=15 + +##### Weather Forcast Day 2 Symbole "AccuWeather" ##### + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[2].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather03.a03.pic=15 + +##### Weather Forcast Day 3 Symbole "AccuWeather" ##### + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[3].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather04.a03.pic=15 + +##### Weather Forcast Day 4 Symbole "AccuWeather" ##### + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''sunny''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=2 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''cloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=3 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=4 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''pouring''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=5 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''snowy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=6 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''hail''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''snowy-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=7 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''fog''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=8 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''windy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''windy-variant''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=9 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''lightning''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=10 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''partlycloudy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=11 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''lightning-rainy''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''execptional''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=13 + - if: + - condition: template + value_template: + '{{state_attr(accuweather_home,"forecast")[4].condition + == ''clear-night''}}' + then: + - service: "{{ command_printf }}" + data: + cmd: weather05.a03.pic=15 + +##### Weather Forcast Today "TEMP" "AccuWeather" ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a04 ### Temperature MIN ### + message: "{{states(accuweather_realfeel_temperature_min_0d) | round(0)}}°" + - service: "{{ command_text_printf }}" + data: + component: weather01.a05 ### Temperature MAX ### + message: "{{states(accuweather_realfeel_temperature_max_0d) | round(0)}}°" + +##### Weather Forcast Day 1 "TEMP" "AccuWeather" ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a04 ### Temperature MIN ### + message: "{{states(accuweather_realfeel_temperature_min_1d) | round(0)}}°" + - service: "{{ command_text_printf }}" + data: + component: weather02.a05 ### Temperature MAX ### + message: "{{states(accuweather_realfeel_temperature_max_1d) | round(0)}}°" + +##### Weather Forcast Day 2 "TEMP" "AccuWeather" ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a04 ### Temperature MIN ### + message: "{{states(accuweather_realfeel_temperature_min_2d) | round(0)}}°" + - service: "{{ command_text_printf }}" + data: + component: weather03.a05 ### Temperature MAX ### + message: "{{states(accuweather_realfeel_temperature_max_2d) | round(0)}}°" + +##### Weather Forcast Day 3 "TEMP" "AccuWeather" ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a04 ### Temperature MIN ### + message: "{{states(accuweather_realfeel_temperature_min_3d) | round(0)}}°" + - service: "{{ command_text_printf }}" + data: + component: weather04.a05 ### Temperature MAX ### + message: "{{states(accuweather_realfeel_temperature_max_3d) | round(0)}}°" + +##### Weather Forcast Day 4 "TEMP" "AccuWeather" ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a04 ### Temperature MIN ### + message: "{{states(accuweather_realfeel_temperature_min_4d) | round(0)}}°" + - service: "{{ command_text_printf }}" + data: + component: weather05.a05 ### Temperature MAX ### + message: "{{states(accuweather_realfeel_temperature_max_4d) | round(0)}}°" + +################################################################################ +##### Weather Forcast Details "AccuWeather" ################################### +################################################################################ + - choose: + - conditions: + - condition: trigger + id: weather_update_state + - condition: template + value_template: '{{ weather == "AccuWeather" }}' +##### Weather Forcast Today Details "AccuWeather" ##### + sequence: + - if: + - condition: template + value_template: '{{states(last_click) == "weather01"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a06 + message: "{{ state_attr(accuweather_home,'forecast')[0].precipitation_probability}} %" + - service: "{{ command_printf }}" + data: + cmd: weather01.p06.pic=59 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a07 + message: "{{states(accuweather_hours_of_sun_0d) | round(0)}} h" + - service: "{{ command_printf }}" + data: + cmd: weather01.p07.pic=60 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a08 + message: "{{state_attr(accuweather_uv_index_0d, 'level')}} {{states(accuweather_uv_index_0d) | round(0)}}" + - service: "{{ command_printf }}" + data: + cmd: weather01.p08.pic=61 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a09 + message: "{{states(accuweather_thunderstorm_probability_day_0d) | round(0)}} %" + - service: "{{ command_printf }}" + data: + cmd: weather01.p09.pic=62 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather01.a10 + message: "{{states(accuweather_wind_day_0d) | round(0)}} km/h" + - service: "{{ command_printf }}" + data: + cmd: weather01.p10.pic=63 + +##### Weather Forcast Day 1 Details "AccuWeather" ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather02"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a06 + message: "{{ state_attr(accuweather_home,'forecast')[1].precipitation_probability}} %" + - service: "{{ command_printf }}" + data: + cmd: weather02.p06.pic=59 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a07 + message: "{{states(accuweather_hours_of_sun_1d) | round(0)}} h" + - service: "{{ command_printf }}" + data: + cmd: weather02.p07.pic=60 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a08 + message: "{{state_attr(accuweather_uv_index_1d, 'level')}} {{states(accuweather_uv_index_1d) | round(0)}}" + - service: "{{ command_printf }}" + data: + cmd: weather02.p08.pic=61 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a09 + message: "{{states(accuweather_thunderstorm_probability_day_1d) | round(0)}} %" + - service: "{{ command_printf }}" + data: + cmd: weather02.p09.pic=62 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather02.a10 + message: "{{states(accuweather_wind_day_1d) | round(0)}} km/h" + - service: "{{ command_printf }}" + data: + cmd: weather02.p10.pic=63 + +##### Weather Forcast Day 2 Details "AccuWeather" ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather03"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a06 + message: "{{ state_attr(accuweather_home,'forecast')[2].precipitation_probability}} %" + - service: "{{ command_printf }}" + data: + cmd: weather03.p06.pic=59 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a07 + message: "{{states(accuweather_hours_of_sun_2d) | round(0)}} h" + - service: "{{ command_printf }}" + data: + cmd: weather03.p07.pic=60 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a08 + message: "{{state_attr(accuweather_uv_index_2d, 'level')}} {{states(accuweather_uv_index_2d) | round(0)}}" + - service: "{{ command_printf }}" + data: + cmd: weather03.p08.pic=61 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a09 + message: "{{states(accuweather_thunderstorm_probability_day_2d) | round(0)}} %" + - service: "{{ command_printf }}" + data: + cmd: weather03.p09.pic=62 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather03.a10 + message: "{{states(accuweather_wind_day_2d) | round(0)}} km/h" + - service: "{{ command_printf }}" + data: + cmd: weather03.p10.pic=63 + +##### Weather Forcast Day 3 Details "AccuWeather" ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather04"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a06 + message: "{{ state_attr(accuweather_home,'forecast')[3].precipitation_probability}} %" + - service: "{{ command_printf }}" + data: + cmd: weather04.p06.pic=59 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a07 + message: "{{states(accuweather_hours_of_sun_3d) | round(0)}} h" + - service: "{{ command_printf }}" + data: + cmd: weather04.p07.pic=60 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a08 + message: "{{state_attr(accuweather_uv_index_3d, 'level')}} {{states(accuweather_uv_index_3d) | round(0)}}" + - service: "{{ command_printf }}" + data: + cmd: weather04.p08.pic=61 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a09 + message: "{{states(accuweather_thunderstorm_probability_day_3d) | round(0)}} %" + - service: "{{ command_printf }}" + data: + cmd: weather04.p09.pic=62 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather04.a10 + message: "{{states(accuweather_wind_day_3d) | round(0)}} km/h" + - service: "{{ command_printf }}" + data: + cmd: weather04.p10.pic=63 + +##### Weather Forcast Day 4 Details "AccuWeather" ##### + - if: + - condition: template + value_template: '{{states(last_click) == "weather05"}}' + then: + ##### field 1 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a06 + message: "{{ state_attr(accuweather_home,'forecast')[4].precipitation_probability}} %" + - service: "{{ command_printf }}" + data: + cmd: weather05.p06.pic=59 + ##### field 2 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a07 + message: "{{states(accuweather_hours_of_sun_4d) | round(0)}} h" + - service: "{{ command_printf }}" + data: + cmd: weather05.p07.pic=60 + ##### field 3 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a08 + message: "{{state_attr(accuweather_uv_index_4d, 'level')}} {{states(accuweather_uv_index_4d) | round(0)}}" + - service: "{{ command_printf }}" + data: + cmd: weather05.p08.pic=61 + ##### field 4 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a09 + message: "{{states(accuweather_thunderstorm_probability_day_4d) | round(0)}} %" + - service: "{{ command_printf }}" + data: + cmd: weather05.p09.pic=62 + ##### field 5 ##### + - service: "{{ command_text_printf }}" + data: + component: weather05.a10 + message: "{{states(accuweather_wind_day_4d) | round(0)}} km/h" + - service: "{{ command_printf }}" + data: + cmd: weather05.p10.pic=63 + +######################################### +# +# +############################################################# +##### CLOSE - Weather Forcast AccuWeather ##### +############################################################# +# +## +### +############################################################################################################################################################################################# + diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/climate.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/climate.yaml new file mode 100644 index 0000000..6a64410 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/climate.yaml @@ -0,0 +1,18 @@ +climate: + - platform: generic_thermostat + unique_id: cf308990-0dbd-4e8a-be77-aec56d7a5aa4 + name: NSPanel Büro + heater: switch.nspanel_buro_relay_2 + target_sensor: sensor.nspanel_buro_temperature + min_temp: 13 + max_temp: 27 + ac_mode: false + target_temp: 22 + cold_tolerance: 0.5 + hot_tolerance: 0.5 + min_cycle_duration: + seconds: 60 + keep_alive: + minutes: 3 + initial_hvac_mode: "heat" + precision: 0.5 diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/folder_watcher.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/folder_watcher.yaml new file mode 100644 index 0000000..4a503d1 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/folder_watcher.yaml @@ -0,0 +1,7 @@ +# Please insert into the default file "configuration.yaml +# Folder must be changed to the directory where the tft file (Nextion Editor) will be uploaded +########### +# +#Folder watcher for NS panel auto upload tft +folder_watcher: + - folder: /config/www/nspanel/ \ No newline at end of file diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/sensor.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/sensor.yaml new file mode 100644 index 0000000..1431ae1 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/custom_configuration/sensor.yaml @@ -0,0 +1,78 @@ +##### Sensor ###### +sensor: + + - platform: template + sensors: + wochentag: + friendly_name: "Wochentag" + unique_id: 6ac64850-8563-456c-b562-92343dd96f0b + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,'] %} + {{ now().timestamp() | timestamp_custom(days[now().weekday()] ~ ' %d.%m')}} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag01: + friendly_name: "Wochentag+1" + unique_id: 6b2aad54-3eb0-48cc-ae32-ee3574197f1b + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,'] %} + {{(as_timestamp(now())+ (86400)) | timestamp_custom(days[now().weekday()+1] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag02: + friendly_name: "Wochentag+2" + unique_id: edbddaf0-2791-4774-b8d4-aa706f75cc7a + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,'] %} + {{(as_timestamp(now())+ (172800)) | timestamp_custom(days[now().weekday()+2] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag03: + friendly_name: "Wochentag+3" + unique_id: ad592622-db86-40f7-9961-4c1ffd21c711 + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,', 'Mittwoch,'] %} + {{(as_timestamp(now())+ (259200)) | timestamp_custom(days[now().weekday()+3] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag04: + friendly_name: "Wochentag+4" + unique_id: dcb3ed45-2b89-4672-a04f-a55f025ac745 + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,'] %} + {{(as_timestamp(now())+ (345600)) | timestamp_custom(days[now().weekday()+4] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag05: + friendly_name: "Wochentag+5" + unique_id: 77e642a5-de54-452d-9f4a-febe3a7851c2 + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,'] %} + {{(as_timestamp(now())+ (432000)) | timestamp_custom(days[now().weekday()+ 5] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + +###### NSPanel Büro - climate target temperature ##### + - platform: template + sensors: + nspanel_buro_target_temp: + unique_id: 2393ab74-21ce-42d3-b15e-ec162b9d6f31 + friendly_name: NSPanel Buro Target Temp + value_template: "{{ state_attr('climate.nspanel_buro', 'temperature') }}" + +###### NSPanel Büro - climate target temperature ##### + - platform: template + sensors: + nspanel_lea_target_temp: + unique_id: e8e61ff7-3a41-47ad-bd6c-303f730de96f + friendly_name: NSPanel Lea Target Temp + value_template: "{{ state_attr('climate.nspanel_lea', 'temperature') }}" \ No newline at end of file diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/esphome.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/esphome.yaml new file mode 100644 index 0000000..73cf7e6 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/esphome.yaml @@ -0,0 +1,1198 @@ +############################################################# +##### START - SUBSTITUTIONS ##### +############################################################# +substitutions: +##### GENEREL CONFIG ############################################################################################# + node_name: nspanel-buero # $node_name + device_name: NSPanel Buero # $device_name + + wifi_ssid: !secret wifi_ssid # add in your esphome secrets file. + wifi_password: !secret wifi_password # add in your esphome secrets file. + ota_password: !secret ota_password # add in your esphome secrets file. +# nextion_update_url: !secret nextion_update_url_buero # add in your esphome secrets file. + nextion_update_url: "http://192.168.4.250:8123/local/nspanel/buero/nspanel_buero.tft" +###### EDIT THE BELOW ENTITIES FOR YOURS... ####################################################################### + + #ha_weekday: sensor.wochentag ##### Sensor Wochentag generiert in HA (custom_configuration -> nspanel) ##### + #ha_outdoor_temp: sensor.terrasse_garage_motion_sensor_temperature ##### Temperatur von Bewegungsmelder Outdoor (Zigbee2Mqtt) ##### + #ha_hotwater_temp: sensor.hotwater_temp ##### Buderus Heizung Warmwasser Temperatur (Integration) ##### + ha_hotwater_charge: switch.charge + ha_heating_system_flame: binary_sensor.flamestatus ##### Buderus Heizung Flamen-Status (Integration) ##### + ha_climate_thermostat_target_temp: sensor.nspanel_buro_target_temp ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### + ha_climate_thermostat: climate.nspanel_buro ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### + #ha_humidity: sensor.kinderzimmer_lea_temperatur_sensor_humidity +######################################### +# +# +############################################################# +##### CLOSE - SUBSTITUTIONS ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - Settings ##### +############################################################# +# +# +######################################### + +##### Functionality for the Nextion display ##### +external_components: + - source: github://pr#2956 + components: [nextion] + refresh: 1h + +##### ESP home CONFIG ##### +esphome: + name: $node_name + comment: $device_name + +##### TYPE OF ESP BOARD ##### +esp32: + board: esp32dev + +##### WIFI SETUP ##### +wifi: + ssid: $wifi_ssid + password: $wifi_password + power_save_mode: none + +captive_portal: + +##### OTA (Over the air updates) password ##### +ota: + password: $ota_password + safe_mode: true + reboot_timeout: 3min + num_attempts: 3 + +##### LOGGER ##### +logger: +# baud_rate: 0 +# level: WARN + +##### CONFIGURE INTERNAL BUZZER ##### +output: + ##### BUZZER FOR PLAYING RINGTONES ##### + - platform: ledc + id: buzzer_out + pin: + number: 21 + +##### ENABLE RINGTONE MUSIC SUPPORT ##### +rtttl: + id: buzzer + output: buzzer_out + +##### UART FOR NEXTION DISPLAY ##### +uart: + tx_pin: 16 + rx_pin: 17 + baud_rate: 115200 + id: tf_uart + +##### INFO - Time component that fetches time from home Assistant and updates the display once a minute and when the display is ready at bootup (and time is available) ##### +#time: +# - platform: homeassistant +# id: homeassistant_time +# on_time: +# - seconds: 0 +# minutes: /1 +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a01", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute); +# on_time_sync: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a01", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute); + +###### A reboot button is always useful ##### +button: + - platform: restart + name: $device_name Restart + id: restart_nspanel + +######################################### +# +# +############################################################# +##### CLOSE - Settings ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - API ##### +############################################################# +# +# +######################################### + +api: + services: + +##### SERVICE TO UPDATE THE HMI FILE ##### + - service: upload_tft + then: + - lambda: 'id(disp1)->upload_tft();' + +##### Service to send a command "printf" directly to the display. Useful for testing ##### + - service: send_command_printf + variables: + cmd: string + then: + - lambda: 'id(disp1).send_command_printf("%s", cmd.c_str());' + +##### Service to send a command "text_printf" directly to the display. Useful for testing ##### + - service: send_command_text_printf + variables: + component: string + message: string + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());' + +##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_value + variables: + component: string + message: int + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_value(component.c_str(), message);' + +##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_hide + variables: + component: string + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).hide_component(component.c_str());' + + + +##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_font_color + variables: + component: string + message: int + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_font_color(component.c_str(), message);' +##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_background_color + variables: + component: string + message: int + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_background_color(component.c_str(), message);' + +######################################### +# +# +############################################################# +##### CLOSE - API ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - GLOBALS ##### +############################################################# +# +# +######################################### + +globals: + +##### Save Target Temp ##### + - id: climate_target_temp_val_global + type: float + restore_value: true + initial_value: '12' + +##### Save Thermostat PIC Position ##### + - id: climate_slider_val_global + type: int + restore_value: true + initial_value: '0' + +##### Save Display Brightness for NSPanel reboot ##### + - id: display_brightness_global + type: int + restore_value: true + initial_value: '100' + +##### Save Display DIM Brightness for NSPanel reboot + - id: display_dim_brightness_global + type: int + restore_value: true + initial_value: '10' + +##### Save Display DIM Brightness for NSPanel reboot + - id: sleep_modus_global + type: int + restore_value: true + initial_value: '0' + +##### Save State Heating Room ##### + - id: heating_room_global + type: int + restore_value: true + initial_value: '0' + +##### Save State HVAC ##### + - id: hvac_mode_global + type: int + restore_value: true + initial_value: '0' + +######################################### +# +# +############################################################# +##### CLOSE - GLOBALS ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - BINARY SENSOR ##### +############################################################# +# +# +######################################### + +binary_sensor: + +###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY##### + - platform: gpio + name: $device_name Left Button + pin: + number: 14 + inverted: true +# on_click: +# - switch.toggle: relay_1 + +##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY ##### + - platform: gpio + name: $device_name Right Button + pin: + number: 27 + inverted: true +# on_click: +# - switch.toggle: relay_2 + +##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA ##### + - platform: nextion + name: $device_name Climate Target DOWN + page_id: 6 + component_id: 13 + internal: true + on_click: + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: $ha_climate_thermostat + temperature: !lambda return id(climate_target_temp_val_global) - 0.5; + +##### THERMOSTAT - BUTTON INCREASES CLIMATE TARGET TEMPERATURE IN HA ##### + - platform: nextion + name: $device_name Climate Target UP + page_id: 6 + component_id: 14 + internal: true + on_click: + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: $ha_climate_thermostat + temperature: !lambda return id(climate_target_temp_val_global) + 0.5; + +##### THERMOSTAT - BUTTON ON / OFF Heating ##### + - platform: nextion + name: $device_name Heating Room State + id: heating_room_state + page_id: 6 + component_id: 16 + internal: true + on_click: + - switch.toggle: hvac_mode + +##### Display Brightness - BUTTON DECREASES Brightness ##### +# - platform: nextion +# name: $device_name Brightness DOWN +# page_id: 7 +# component_id: 12 +# internal: true +# on_click: +# - number.set: +# id: display_brightness +# value: !lambda return id(display_brightness_global) - 1; +# - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); +# - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); + +##### Display Brightness - BUTTON INCREASES Brightness ##### +# - platform: nextion +# name: $device_name Brightness UP +# page_id: 7 +# component_id: 13 +# internal: true +# on_click: +# - number.set: +# id: display_brightness +# value: !lambda return id(display_brightness_global) + 1; +# - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); +# - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); + +##### Display DIM Brightness - BUTTON DECREASES Brightness ##### +# - platform: nextion +# name: $device_name Brightness DIM DOWN +# page_id: 7 +# component_id: 14 +# internal: true +# on_click: +# - number.set: +# id: display_dim_brightness +# value: !lambda return id(display_dim_brightness_global) - 1; +# - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); +# - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); + +##### Display DIM Brightness - BUTTON INCREASES Brightness ##### +# - platform: nextion +# name: $device_name Brightness DIM UP +# page_id: 7 +# component_id: 15 +# internal: true +# on_click: +# - number.set: +# id: display_dim_brightness +# value: !lambda return id(display_dim_brightness_global) + 1; +# - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); +# - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); + +##### Restart NSPanel Button ##### + - platform: nextion + name: $device_name Restart + page_id: 7 + component_id: 10 + internal: true + on_click: + - button.press: restart_nspanel + +##### Sleep Modus NSPanel Button ##### + - platform: nextion + name: $device_name Sleep Modus + page_id: 7 + component_id: 5 + internal: true + on_click: + - switch.toggle: sleep_modus + +##### Hotwater Charge ##### + - platform: nextion + name: $device_name Hotwater Charge + page_id: 6 + component_id: 21 + on_click: + - homeassistant.service: + service: switch.toggle + data: + entity_id: $ha_hotwater_charge + +######################################### +# +# +############################################################# +##### CLOSE - BINARY SENSOR ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - SENSOR ##### +############################################################# +# +# +######################################### + +sensor: + +##### INTERNAL TEMPERATUE SENSOR, ADC VALUE ##### + - platform: adc + id: ntc_source + pin: 38 + update_interval: 10s + attenuation: 11db + +##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)##### + - platform: resistance + id: resistance_sensor + sensor: ntc_source + configuration: DOWNSTREAM + resistor: 11.2kOhm + +##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) ##### + - platform: ntc + name: $device_name Temperature + id: temp_nspanel + sensor: resistance_sensor + calibration: + b_constant: 3950 + reference_temperature: 25°C + reference_resistance: 10kOhm + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: id(disp1).set_component_text_printf("home.a03", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page. + - lambda: id(disp1).set_component_text_printf("thermostat.a04", "%.1f", id(temp_nspanel).state); + +##### TEMPERATURE Outdoor FROM HA ##### +# - platform: homeassistant +# id: temp_outdoor +# entity_id: $ha_outdoor_temp +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a06", "%.0f°", id(temp_outdoor).state); +# - lambda: id(disp1).set_component_text_printf("thermostat.a07", "%.0f°", id(temp_outdoor).state); + +##### HUMIDITY Indoor FROM HA ##### +# - platform: homeassistant +# id: humidity +# entity_id: $ha_humidity +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a04", "%.0f°", id(humidity).state); + + +##### THERMOSTAT HOT WATER TEMP FROM HA ##### +# - platform: homeassistant +# id: temp_hotwater +# entity_id: $ha_hotwater_temp +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a07", "%.1f°", id(temp_hotwater).state); +# - lambda: id(disp1).set_component_text_printf("thermostat.a08", "%.1f°", id(temp_hotwater).state); + +##### THERMOSTAT CLIMATE TARGET TEMPERATURE FROM HA ##### + - platform: homeassistant + id: ha_climate_target_temp + entity_id: $ha_climate_thermostat_target_temp + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - globals.set: + id: climate_target_temp_val_global + value: !lambda 'return float(x);' + - lambda: id(disp1).set_component_text_printf("thermostat.a05", "%.1f", id(climate_target_temp_val_global)); + # THERMO PROGRESS CIRCLE, broken into 3 images to create space for the temperatures in the center. + - lambda: |- + int left=16; // 16 is empty left. + int mid=17; // 17 is empty mid. + int right=18; // 18 is empty right. + if (id(climate_target_temp_val_global) == 13) { + left=16; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 13.5) { + left=19; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 14) { + left=20; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 14.5) { + left=21; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 15) { + left=22; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 15.5) { + left=23; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 16) { + left=24; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 16.5) { + left=25; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 17) { + left=26; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 17.5) { + left=27; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 18) { + left=28; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 18.5) { + left=29; + mid=30; + right=18; + } else if (id(climate_target_temp_val_global) == 19) { + left=29; + mid=31; + right=18; + } else if (id(climate_target_temp_val_global) == 19.5) { + left=29; + mid=32; + right=18; + } else if (id(climate_target_temp_val_global) == 20) { + left=29; + mid=33; + right=18; + } else if (id(climate_target_temp_val_global) == 20.5) { + left=29; + mid=34; + right=18; + } else if (id(climate_target_temp_val_global) == 21) { + left=29; + mid=35; + right=18; + } else if (id(climate_target_temp_val_global) == 21.5) { + left=29; + mid=36; + right=18; + } else if (id(climate_target_temp_val_global) == 22) { + left=29; + mid=37; + right=38; + } else if (id(climate_target_temp_val_global) == 22.5) { + left=29; + mid=37; + right=39; + } else if (id(climate_target_temp_val_global) == 23) { + left=29; + mid=37; + right=40; + } else if (id(climate_target_temp_val_global) == 23.5) { + left=29; + mid=37; + right=41; + } else if (id(climate_target_temp_val_global) == 24) { + left=29; + mid=37; + right=42; + } else if (id(climate_target_temp_val_global) == 24.5) { + left=29; + mid=37; + right=43; + } else if (id(climate_target_temp_val_global) == 25) { + left=29; + mid=37; + right=44; + } else if (id(climate_target_temp_val_global) == 25.5) { + left=29; + mid=37; + right=45; + } else if (id(climate_target_temp_val_global) == 26) { + left=29; + mid=37; + right=46; + } else if (id(climate_target_temp_val_global) == 26.5) { + left=29; + mid=37; + right=47; + } else if (id(climate_target_temp_val_global) == 27) { + left=29; + mid=37; + right=48; + } + // sends the 3 images to the display + id(disp1).send_command_printf("thermostat.a01.pic=%i", left); + id(disp1).send_command_printf("thermostat.a02.pic=%i", mid); + id(disp1).send_command_printf("thermostat.a03.pic=%i", right); + +###### TARGET TEMPERATURE GET VALUE FROM NEXTION CIRCLE SLIDER AND SET GLOBAL VARIBLE ##### + - platform: nextion + id: climate_circleslider + name: $device_name Climate circleslider + variable_name: climateslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - globals.set: + id: climate_slider_val_global + value: !lambda 'return int(x);' + - lambda: |- + if (id(climate_slider_val_global) == 0) { + id(climate_target_temp_val_global) = 13; + } else if (id(climate_slider_val_global) == 1) { + id(climate_target_temp_val_global) = 13.5; + } else if (id(climate_slider_val_global) == 2) { + id(climate_target_temp_val_global) = 14; + } else if (id(climate_slider_val_global) == 3) { + id(climate_target_temp_val_global) = 14.5; + } else if (id(climate_slider_val_global) == 4) { + id(climate_target_temp_val_global) = 15; + } else if (id(climate_slider_val_global) == 5) { + id(climate_target_temp_val_global) = 15.5; + } else if (id(climate_slider_val_global) == 6) { + id(climate_target_temp_val_global) = 16; + } else if (id(climate_slider_val_global) == 7) { + id(climate_target_temp_val_global) = 16.5; + } else if (id(climate_slider_val_global) == 8) { + id(climate_target_temp_val_global) = 17; + } else if (id(climate_slider_val_global) == 9) { + id(climate_target_temp_val_global) = 17.5; + } else if (id(climate_slider_val_global) == 10) { + id(climate_target_temp_val_global) = 18; + } else if (id(climate_slider_val_global) == 11) { + id(climate_target_temp_val_global) = 18.5; + } else if (id(climate_slider_val_global) == 12) { + id(climate_target_temp_val_global) = 19; + } else if (id(climate_slider_val_global) == 13) { + id(climate_target_temp_val_global) = 19.5; + } else if (id(climate_slider_val_global) == 14) { + id(climate_target_temp_val_global) = 20; + } else if (id(climate_slider_val_global) == 15) { + id(climate_target_temp_val_global) = 20.5; + } else if (id(climate_slider_val_global) == 16) { + id(climate_target_temp_val_global) = 21; + } else if (id(climate_slider_val_global) == 17) { + id(climate_target_temp_val_global) = 21.5; + } else if (id(climate_slider_val_global) == 18) { + id(climate_target_temp_val_global) = 22; + } else if (id(climate_slider_val_global) == 19) { + id(climate_target_temp_val_global) = 22.5; + } else if (id(climate_slider_val_global) == 20) { + id(climate_target_temp_val_global) = 23; + } else if (id(climate_slider_val_global) == 21) { + id(climate_target_temp_val_global) = 23.5; + } else if (id(climate_slider_val_global) == 22) { + id(climate_target_temp_val_global) = 24; + } else if (id(climate_slider_val_global) == 23) { + id(climate_target_temp_val_global) = 24.5; + } else if (id(climate_slider_val_global) == 24) { + id(climate_target_temp_val_global) = 25; + } else if (id(climate_slider_val_global) == 25) { + id(climate_target_temp_val_global) = 25.5; + } else if (id(climate_slider_val_global) == 26) { + id(climate_target_temp_val_global) = 26; + } else if (id(climate_slider_val_global) == 27) { + id(climate_target_temp_val_global) = 26.5; + } else if (id(climate_slider_val_global) == 28) { + id(climate_target_temp_val_global) = 27; + } + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: $ha_climate_thermostat + temperature: !lambda return id(climate_target_temp_val_global); + +###### Display Brightness GET VALUE FROM NSPanel SLIDER ##### + - platform: nextion + id: brightslider + name: $device_name brightness Slider + variable_name: brightslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - number.set: + id: display_brightness + value: !lambda 'return int(x);' + # send text field percentage of current_lightslider_val + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + +###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER ##### + - platform: nextion + id: dimslider + name: $device_name dim brightness slider + variable_name: dimslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - number.set: + id: display_dim_brightness + value: !lambda 'return int(x);' + # send text field percentage of current_lightslider_val + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + + +######################################### +# +# +############################################################# +##### CLOSE - SENSOR ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - TEXT SENSOR##### +############################################################# +# +# +######################################### + +text_sensor: + +##### ESPhome version used to compile the app ##### + - platform: version + name: $device_name ESPhome Version + +##### SUN SENSOR FROM HA ##### + - platform: homeassistant + id: sun_sun + entity_id: sun.sun + +##### last click sensor, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: $device_name last click + id: disp1_last_click_va + update_interval: 50ms + component_name: lastclick + +##### last click lightsettings page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: $device_name last click lightsettings + id: disp1_last_click_lightsettings + update_interval: 50ms + component_name: lightsetting + +##### last click coversettings page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: $device_name last click coversettings + id: disp1_last_click_coversettings + update_interval: 50ms + component_name: coverposition + +##### Wochentag SENSOR FROM HA ##### +# - platform: homeassistant +# id: weekday +# entity_id: $ha_weekday +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a02", "%s", id(weekday).state.c_str()); + +##### HEATING System ICON ##### + - platform: homeassistant + entity_id: $ha_heating_system_flame + name: "Heating System" + id: heating_system + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + int symbol=53; // 53 is a blank image 20x20 + if (id(heating_system).state == "on") { + symbol=64; + } + id(disp1).send_command_printf("home.a50.pic=%i", symbol); + id(disp1).send_command_printf("thermostat.a50.pic=%i", symbol); + +##### Hotwater Charge ICON ##### + - platform: homeassistant + entity_id: $ha_hotwater_charge + name: "Hotwater Charge" + id: hotwater_charge + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + if (id(hotwater_charge).state == "on") { + id(disp1).set_component_value("thermostat.a12",1); + } else { + id(disp1).set_component_value("thermostat.a12",0); + } +# - lambda: |- +# id(disp1).set_component_value("thermostat.a12",0); +# if (id(hotwater_charge) == "on") +# { +# id(disp1).set_component_value("thermostat.a12",1); +# } + +##### WEATHER SYMBOL FROM HA WEATHER ENTITY ##### +# - platform: homeassistant +# id: weather_symbol +# entity_id: weather.home_wetter +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: |- +# int symbol=1; // 1 is a empty box. +# if (id(weather_symbol).state == "sunny") { +# symbol=2; +# } else if (id(weather_symbol).state == "cloudy") { +# symbol=3; +# if (id(sun_sun).state == "below_horizon") { +# symbol=3; +# } +# } else if (id(weather_symbol).state == "rainy") { +# symbol=4; +# } else if (id(weather_symbol).state == "pouring") { +# symbol=5; +# } else if (id(weather_symbol).state == "snowy") { +# symbol=6; +# } else if (id(weather_symbol).state == "hail" || id(weather_symbol).state == "snowy-rainy") { +# symbol=7; +# } else if (id(weather_symbol).state == "fog") { +# symbol=8; +# } else if (id(weather_symbol).state == "windy" || id(weather_symbol).state == "windy-variant") { +# symbol=9; +# } else if (id(weather_symbol).state == "lightning") { +# symbol=10; +# } else if (id(weather_symbol).state == "partlycloudy") { +# symbol=11; +# if (id(sun_sun).state == "below_horizon") { +# symbol=12; +# } +# } else if (id(weather_symbol).state == "lightning-rainy" || id(weather_symbol).state == "exceptional") { +# symbol=13; +# if (id(sun_sun).state == "below_horizon") { +# symbol=14; +# } +# } else if (id(weather_symbol).state == "clear-night") { +# symbol=15; +# } +# id(disp1).send_command_printf("home.a05.pic=%i", symbol); + +######################################### +# +# +############################################################# +##### CLOSE - TEXT SENSOR ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - SWITCH ##### +############################################################# +# +# +######################################### + +switch: + +##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display ##### + - platform: template + name: $device_name Nextion inited + id: nextion_init + entity_category: config + restore_state: false + assumed_state: off + optimistic: true + +##### UPDATE TFT DISPLAY ##### + - platform: template + name: Update TFT display + id: tft_update + turn_on_action: + - delay: 16ms + - lambda: id(disp1).upload_tft(); + - switch.turn_off: tft_update + +##### PHYSICAL SWITCH 1 ##### + - platform: gpio + name: $device_name Relay 1 + id: relay_1 + pin: + number: 22 + +##### PHYSICAL SWITCH 2 ###### + - platform: gpio + name: $device_name Relay 2 + id: relay_2 + pin: + number: 19 + on_turn_off: + - globals.set: + id: heating_room_global + value: '0' + - lambda: |- + if (id(hvac_mode_global) == 0) + { + id(disp1).send_command_printf("thermostat.a06.pic=49"); + } else if (id(hvac_mode_global) == 1) { + id(disp1).send_command_printf("thermostat.a06.pic=50"); + } + - lambda: id(disp1).send_command_printf("home.a52.pic=53"); + - lambda: id(disp1).send_command_printf("thermostat.a52.pic=53"); + on_turn_on: + - globals.set: + id: heating_room_global + value: '1' + - lambda: id(disp1).send_command_printf("thermostat.a06.pic=51"); + - lambda: id(disp1).send_command_printf("home.a52.pic=66"); + - lambda: id(disp1).send_command_printf("thermostat.a52.pic=66"); + +##### Switch Climate HVAC Mode ##### + - platform: template + device_class: switch + name: $device_name hvac Mode + id: hvac_mode + restore_state: true + assumed_state: false + optimistic: true + on_turn_off: + - lambda: id(disp1).set_component_value("thermostat.a10",0); + - globals.set: + id: hvac_mode_global + value: '0' + - homeassistant.service: + service: climate.set_hvac_mode + data_template: + entity_id: $ha_climate_thermostat + hvac_mode: 'off' + - lambda: id(disp1).send_command_printf("thermostat.a06.pic=49"); + - lambda: id(disp1).send_command_printf("home.a51.pic=53"); + - lambda: id(disp1).send_command_printf("thermostat.a51.pic=53"); + on_turn_on: + - lambda: id(disp1).set_component_value("thermostat.a10",1); + - globals.set: + id: hvac_mode_global + value: '1' + - homeassistant.service: + service: climate.set_hvac_mode + data_template: + entity_id: $ha_climate_thermostat + hvac_mode: 'heat' + - lambda: |- + if (id(heating_room_global) == 0) + { + id(disp1).send_command_printf("thermostat.a06.pic=50"); + } else if (id(heating_room_global) == 1) { + id(disp1).send_command_printf("thermostat.a06.pic=51"); + } + - lambda: id(disp1).send_command_printf("home.a51.pic=65"); + - lambda: id(disp1).send_command_printf("thermostat.a51.pic=65"); + +##### DISPLAY ALWAYS ON ##### + - platform: gpio + name: $device_name Screen Power + id: screen_power + entity_category: config + pin: + number: 4 + inverted: true + restore_mode: ALWAYS_ON + internal: true + +##### Switch Display Sleep Modus ##### + - platform: template + device_class: switch + name: $device_name Sleep Modus + id: sleep_modus + restore_state: true + assumed_state: false + optimistic: true + on_turn_off: + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=0"); + - globals.set: + id: sleep_modus_global + value: '0' + - lambda: id(disp1).set_component_value("settings.a02",0); + on_turn_on: + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=1"); + - globals.set: + id: sleep_modus_global + value: '1' + - lambda: id(disp1).set_component_value("settings.a02",1); + +######################################### +# +# +############################################################# +##### CLOSE - SWITCH ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - NUMBER ##### +############################################################# +# +# +######################################### + +number: + +##### SCREEN BRIGHTNESS ##### + - platform: template + name: $device_name Display Brightness + id: display_brightness + entity_category: config + unit_of_measurement: '%' + min_value: 1 + max_value: 100 + step: 1 + restore_value: true + optimistic: true + set_action: + then: + - lambda: 'id(disp1).set_backlight_brightness(x/100);' + - lambda: 'id(disp1).send_command_printf("home.brightness.val=%i", int(x));' + - globals.set: + id: display_brightness_global + value: !lambda 'return int(x);' + +##### SCREEN BRIGHTNESS DIMMED DOWN ##### + - platform: template + name: $device_name Display Brightness Dimdown + id: display_dim_brightness + entity_category: config + unit_of_measurement: '%' + min_value: 1 + max_value: 100 + step: 1 + restore_value: true + optimistic: true + set_action: + then: + - lambda: 'id(disp1).send_command_printf("home.brightdd.val=%i", int(x));' + - globals.set: + id: display_dim_brightness_global + value: !lambda 'return int(x);' + +######################################### +# +# +############################################################# +##### CLOSE - NUMBER ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - DISPLAY START##### +############################################################# +# +# +######################################### + +display: + - platform: nextion + id: disp1 + uart_id: tf_uart + tft_url: $nextion_update_url + on_setup: + then: + - lambda: id(disp1).send_command_printf("page 9"); ##### CHANGE! - Loading page ##### + - wait_until: + api.connected + - delay: 0.5s + - rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6" + - delay: 0.5s + - switch.template.publish: + id: nextion_init + state: on + - lambda: id(disp1).send_command_printf("page 0"); #### home page ##### + - delay: 2s ##### gives the display time to update other components & set the home page ##### + - number.set: + id: display_brightness + value: !lambda 'return id(display_brightness_global);' + - number.set: + id: display_dim_brightness + value: !lambda 'return id(display_dim_brightness_global);' + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global)); + - lambda: |- + id(disp1).set_component_value("settings.a02",0); + if (id(sleep_modus_global) == 1) + { + id(disp1).set_component_value("settings.a02",1); + } + - lambda: |- + id(disp1).send_command_printf("home.a50.pic=53"); + id(disp1).send_command_printf("thermostat.a50.pic=53"); + id(disp1).send_command_printf("thermostat.a06.pic=50"); + if (id(heating_room_global) == 1) + { + id(disp1).send_command_printf("home.a52.pic=66"); + id(disp1).send_command_printf("thermostat.a52.pic=66"); + id(disp1).send_command_printf("thermostat.a06.pic=51"); + } + - lambda: |- + if (id(hvac_mode_global) == 0) { + id(disp1).send_command_printf("home.a51.pic=53"); + id(disp1).send_command_printf("thermostat.a51.pic=53"); + id(disp1).send_command_printf("thermostat.a06.pic=49"); + } else if (id(hvac_mode_global) == 1) { + id(disp1).send_command_printf("home.a51.pic=65"); + id(disp1).send_command_printf("thermostat.a51.pic=65"); + id(disp1).set_component_value("thermostat.a10",1); + } + +############################################################# +##### CLOSE - DISPLAY START ##### +############################################################# \ No newline at end of file diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/nspanel_buero.tft b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/nspanel_buero.tft new file mode 100644 index 0000000..c42ff31 Binary files /dev/null and b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-beta/nspanel_buero.tft differ diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/README.md b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/README.md new file mode 100644 index 0000000..de77f34 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/README.md @@ -0,0 +1,159 @@ +# NSPanel Custom with HA Blueprint +Custom Firmware for NsPanel (esphome) and HA Blueprint with configuration of button, light settings, thermostate, colorwheel, colortemp, cover, weather preview, automatic TFT upload etc. + +Why another version for the NSPanel? +Well - all versions I've seen have been missing something everywhere. +That's why I decided to create something myself. + +My thanks to Masto, Marcfager, lovejoy777, Hellis81 and SmartHome yourself ( link see below) for sharing your code. Give them the credit they deserve, I'm merely a copy paste ninja. XDD + + +### GOAL: +My goal was to create a version that could be quickly adopted for multiple NSPanels. +In addition, the configuration should be as simple as possible. Therefore I decided to put most of it into a HA Blueprint + +In addition, another NSPanel can be configured very quickly. But have a look yourself ;) + +![My project-1-16](https://user-images.githubusercontent.com/41958506/192649717-6b04cd1a-1829-4fd5-8ba4-09eaf32f85d0.png) +![My project-1-18](https://user-images.githubusercontent.com/41958506/192650810-c7210d15-a07e-4f70-a593-af0a51c7f4bb.png) + +(Home / Thermostat - more pictures see below) + +## Features: +- easy to use and simple configuration via Blueprint +- 40 buttons on 5 button pages with long press function for settings (more buttons are also possible) +- Weather + 5 days weather forcast +- Thermostat + Touch + Relay control for floor heating +- Light control (brightness-slider, colorwheel, TempColor-slider) - via Long Press +- Cover control (open, close, position-slider) - via long press +- Settings page (display brightness, display dim brightness, auto-dim, sleep mode, reboot NSPanel) +- Swipe between pages +- Top menu with 10 icons for specific states +- Heating control (hot water) +- Auto Upload TFT File to Nextion Display +- Swipe between pages +- modern design - design easy to change via Adobe Express (free + design template) +- 2 pysical switches +- and much more ;) + + +## NSPanel: +![My project-1-16](https://user-images.githubusercontent.com/41958506/192649717-6b04cd1a-1829-4fd5-8ba4-09eaf32f85d0.png) +![My project-1-17](https://user-images.githubusercontent.com/41958506/192650793-9b657fa2-8056-46d7-aca3-065cde291df8.png) + +(Home / Weather Forcast) + +![My project-1-18](https://user-images.githubusercontent.com/41958506/192650810-c7210d15-a07e-4f70-a593-af0a51c7f4bb.png) +![My project-1-20](https://user-images.githubusercontent.com/41958506/192652078-ec4f3268-c00b-42a8-b1f9-c4da3e53d7a5.png) + +(Thermostat / Settings Page) + +![My project-1-22](https://user-images.githubusercontent.com/41958506/192652105-23baac1d-9dee-40c1-8596-9cae8827cf1c.png) +![My project-1-23](https://user-images.githubusercontent.com/41958506/192652116-93b850d3-553b-4f14-bb0f-78dff959e2fd.png) + +(Light Settings Colorwheel / Light Settings TempColor) + +![My project-1-24](https://user-images.githubusercontent.com/41958506/192652126-91b0aae9-75ae-44a0-842d-0a78d93f2da5.png) +![My project-1-25](https://user-images.githubusercontent.com/41958506/192652131-604c0636-0f96-44b8-ae6a-793bde56d0e1.png) + +(Cover Settings / Button Page) + +![My project-1-26](https://user-images.githubusercontent.com/41958506/192652263-297cda87-3eff-452c-9ec3-3cd76da94de7.png) + +## Blueprint: +![Bildschirmfoto 2022-09-27 um 23 13 33](https://user-images.githubusercontent.com/41958506/192652755-069f91c9-927e-4aea-9569-d596cdfa0e56.png) + +# Pages + +## Home +- current weather with button to Weather Forcast page +- Temperature outside +- Status icons at the top +- Room temperature with button to thermostat page +- Room humidity +- Hot water temperature +- Button to display settings page + +## Weather Forcast +- 5 days Weather Forcast via swipe (Integration Accuweather - but should also go with another integration) +- Lowest and highest temperature outside +- Date +- Rain probability +- Sunshine hours +- Sun pressure +- Thunderstorm probability +- Wind speed +- Night thunderstorm probability and wind speed + +## Thermostat +- Touch Temp control +- Outside temperature +- Hot water +- Floor heating on, off and idle +- Hot water button +- Status icons + +## Display Settings +- Restart NSPanel +- Sleep mode - display off after time X +- Display brightness slider +- Display dim brightness slider +- Status Brightness in % + +## Light Settings +- Light on and off (alignment with HA) +- Light color with Colorwheel +- Light color with TempColor slider +- Brightness Slider +- Brightness in %. +- Tempcolor value +- Jump back to the right button page + +## Cover Settings +- Open and close cover +- Cover position via slider +- Cover battery value (I use Ikea roller blind) +- jump back to the right button page + +## Button Page +- 40 Button +- 5 Button pages +- all buttons with long press function +- automatic detection by long press if it is a light or cover for submenu +- swipe between all pages +- swipe also down and up for fast access to certain pages +- number of buttons and button pages can be extended - functions like long press, light settings and cover settings stay the same + +## Upcoming Features +- Shorten Esphome code and transfer to Blueprint +- Cover page with window open status as image +- small design adjustments +- Notifications on Home Page +- Energy and Gas consumption on home page +- Extra page for energy dashboard +- Garbage plan with icon on home page +- Let's see what ideas I still have ;) + +## HowTo Deutsch +1. den Code aus der Datei esphome.yaml kopieren und in HA unter esphome einfügen. Vorher muss natürlich ein Device erstellt werden. +1.2 in der ESPhome Datei müssen Passwörter eingesetzt werden. Entweder in der ESPHome Secret oder einfach in der ESPhome Datei +1.3 Einige Entities sind aktuell noch in der Esphome Datei angegeben (direkt unter den Passwörtern. Diese Entities müssen noch angepasst werden. In zukunft will ich aber auch diese ins Bluebrint einbauen +3. den Code aus der Datei blueprint.yaml kopieren und eine neue yaml Datei unter config/blueprints erstellen und den Code einfügen +4. HA Automationen neu starten -> Enticklerwerkzege -> YAML -> Automatisierungen +5. den Code aus der Datei sensor.yaml und climate.yaml kopieren und eine eigenen yaml Datei erstellen. Der Code wird in zukunft direkt im Blueprint eingebaut. +6. den Code aus der Datei folder_wather kopieren und in der coniguration.yaml einfügen +7. TFT File auf Home Assistant hochladen (Der Pfad kann später im Blueprint angegeben werden +8. Blueprint unter Automationen auswählen und und Felder ausfüllen. + + + +## Thanks to: +SmartHome Yourself: https://www.youtube.com/c/SmarthomeyourselfDe_DIY + +Masto: https://github.com/masto/NSPanel-Demo-Files + +Marcfager: https://github.com/marcfager/nspanel-mf + +lovejoy77: https://github.com/lovejoy777/NSpanel + +Hellis81: https://github.com/Hellis81/NS-panel diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/blueprint.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/blueprint.yaml new file mode 100644 index 0000000..0a16989 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/blueprint.yaml @@ -0,0 +1,3341 @@ +blueprint: + name: NSPanel Configuration + description: Synchronize NSpanel Button with HA Entities and Back! And many other things! + 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 (Optional) + description: Nextion Editor - *buttonpage01.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity02: + name: Button 02 (Optional) + description: Nextion Editor - *buttonpage01.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity03: + name: Button 03 (Optional) + description: Nextion Editor - *buttonpage01.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity04: + name: Button 04 (Optional) + description: Nextion Editor - *buttonpage01.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity05: + name: Button 05 (Optional) + description: Nextion Editor - *buttonpage01.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity06: + name: Button 06 (Optional) + description: Nextion Editor - *buttonpage01.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity07: + name: Button 07 (Optional) + description: Nextion Editor - *buttonpage01.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity08: + name: Button 08 (Optional) + description: Nextion Editor - *buttonpage01.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity09: + name: Button 09 (Optional) + description: Nextion Editor - *buttonpage02.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity10: + name: Button 10 (Optional) + description: Nextion Editor - *buttonpage02.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity11: + name: Button 11 (Optional) + description: Nextion Editor - *buttonpage02.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity12: + name: Button 12 (Optional) + description: Nextion Editor - *buttonpage02.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity13: + name: Button 13 (Optional) + description: Nextion Editor - *buttonpage01.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity14: + name: Button 14 (Optional) + description: Nextion Editor - *buttonpage02.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity15: + name: Button 15 (Optional) + description: Nextion Editor - *buttonpage02.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity16: + name: Button 16 (Optional) + description: Nextion Editor - *buttonpage02.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity17: + name: Button 17 (Optional) + description: Nextion Editor - *buttonpage03.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity18: + name: Button 18 (Optional) + description: Nextion Editor - *buttonpage03.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity19: + name: Button 19 (Optional) + description: Nextion Editor - *buttonpage03.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity20: + name: Button 20 (Optional) + description: Nextion Editor - *buttonpage03.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity21: + name: Button 21 (Optional) + description: Nextion Editor - *buttonpage03.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity22: + name: Button 22 (Optional) + description: Nextion Editor - *buttonpage03.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity23: + name: Button 23 (Optional) + description: Nextion Editor - *buttonpage03.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity24: + name: Button 24 (Optional) + description: Nextion Editor - *buttonpage03.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity25: + name: Button 25 (Optional) + description: Nextion Editor - *buttonpage04.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity26: + name: Button 26 (Optional) + description: Nextion Editor - *buttonpage04.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity27: + name: Button 27 (Optional) + description: Nextion Editor - *buttonpage04.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity28: + name: Button 28 (Optional) + description: Nextion Editor - *buttonpage04.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity29: + name: Button 29 (Optional) + description: Nextion Editor - *buttonpage04.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity30: + name: Button 30 (Optional) + description: Nextion Editor - *buttonpage04.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity31: + name: Button 31 (Optional) + description: Nextion Editor - *buttonpage04.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity32: + name: Button 32 (Optional) + description: Nextion Editor - *buttonpage04.button08* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity33: + name: Button 33 (Optional) + description: Nextion Editor - *buttonpage05.button01* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity34: + name: Button 34 (Optional) + description: Nextion Editor - *buttonpage05.button02* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity35: + name: Button 35 (Optional) + description: Nextion Editor - *buttonpage05.button03* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity36: + name: Button 36 (Optional) + description: Nextion Editor - *buttonpage05.button04* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity37: + name: Button 37 (Optional) + description: Nextion Editor - *buttonpage05.button05* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity38: + name: Button 38 (Optional) + description: Nextion Editor - *buttonpage05.button06* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity39: + name: Button 39 (Optional) + description: Nextion Editor - *buttonpage05.button07* **(ONLY light | switch | cover | input_boolean)** + default: [] + selector: + entity: + domain: + - light + - switch + - cover + - input_boolean + entity40: + name: Button 40 (Optional) + description: Nextion Editor - *buttonpage05.button08* **(ONLY light | switch | cover | input_boolean)** + 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' + entity04: !input 'entity04' + entity05: !input 'entity05' + entity06: !input 'entity06' + entity07: !input 'entity07' + entity08: !input 'entity08' + entity09: !input 'entity09' + entity10: !input 'entity10' + entity11: !input 'entity11' + entity12: !input 'entity12' + entity13: !input 'entity13' + entity14: !input 'entity14' + entity15: !input 'entity15' + entity16: !input 'entity16' + entity17: !input 'entity17' + entity18: !input 'entity18' + entity19: !input 'entity19' + entity20: !input 'entity20' + entity21: !input 'entity21' + entity22: !input 'entity22' + entity23: !input 'entity23' + entity24: !input 'entity24' + entity25: !input 'entity25' + entity26: !input 'entity26' + entity27: !input 'entity27' + entity28: !input 'entity28' + entity29: !input 'entity29' + entity30: !input 'entity30' + entity31: !input 'entity31' + entity32: !input 'entity32' + entity33: !input 'entity33' + entity34: !input 'entity34' + entity35: !input 'entity35' + entity36: !input 'entity36' + entity37: !input 'entity37' + entity38: !input 'entity38' + entity39: !input 'entity39' + entity40: !input 'entity40' + +######################################### +# +# +############################################################# +##### 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 + +##### Button04 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity04' + for: + seconds: 1 + id: current_state_entity04 + +##### Button05 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity05' + for: + seconds: 1 + id: current_state_entity05 + +##### Button06 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity06' + for: + seconds: 1 + id: current_state_entity06 + +##### Button07 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity07' + for: + seconds: 1 + id: current_state_entity07 + +##### Button08 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity08' + for: + seconds: 1 + id: current_state_entity08 + +##### Button09 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity09' + for: + seconds: 1 + id: current_state_entity09 + +##### Button10 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity10' + for: + seconds: 1 + id: current_state_entity10 + +##### Button11 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity11' + for: + seconds: 1 + id: current_state_entity11 + +##### Button12 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity12' + for: + seconds: 1 + id: current_state_entity12 + +##### Button13 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity13' + for: + seconds: 1 + id: current_state_entity13 + +##### Button14 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity14' + for: + seconds: 1 + id: current_state_entity14 + +##### Button15 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity15' + for: + seconds: 1 + id: current_state_entity15 + +##### Button16 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity16' + for: + seconds: 1 + id: current_state_entity16 + +##### Button17 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity17' + for: + seconds: 1 + id: current_state_entity17 + +##### Button18 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity18' + for: + seconds: 1 + id: current_state_entity18 + +##### Button19 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity19' + for: + seconds: 1 + id: current_state_entity19 + +##### Button20 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity20' + for: + seconds: 1 + id: current_state_entity20 + +##### Button21 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity21' + for: + seconds: 1 + id: current_state_entity21 + +##### Button22 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity22' + for: + seconds: 1 + id: current_state_entity22 + +##### Button23 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity23' + for: + seconds: 1 + id: current_state_entity23 + +##### Button24 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity24' + for: + seconds: 1 + id: current_state_entity24 + +##### Button25 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity25' + for: + seconds: 1 + id: current_state_entity25 + +##### Button26 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity26' + for: + seconds: 1 + id: current_state_entity26 + +##### Button27 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity27' + for: + seconds: 1 + id: current_state_entity27 + +##### Button28 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity28' + for: + seconds: 1 + id: current_state_entity28 + +##### Button29 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity29' + for: + seconds: 1 + id: current_state_entity29 + +##### Button30 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity30' + for: + seconds: 1 + id: current_state_entity30 + +##### Button31 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity31' + for: + seconds: 1 + id: current_state_entity31 + +##### Button32 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity32' + for: + seconds: 1 + id: current_state_entity32 + +##### Button33 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity33' + for: + seconds: 1 + id: current_state_entity33 + +##### Button34 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity34' + for: + seconds: 1 + id: current_state_entity34 + +##### Button35 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity35' + for: + seconds: 1 + id: current_state_entity35 + +##### Button36 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity36' + for: + seconds: 1 + id: current_state_entity36 + +##### Button37 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity37' + for: + seconds: 1 + id: current_state_entity37 + +##### Button38 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity38' + for: + seconds: 1 + id: current_state_entity38 + +##### Button39 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity39' + for: + seconds: 1 + id: current_state_entity39 + +##### Button40 Sync - Trigger ##### + - platform: state + entity_id: !input 'entity40' + for: + seconds: 1 + id: current_state_entity40 + +######################################### +# +# +############################################################# +##### 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 }} + {%- elif states(last_click) == "releasebuttonpage01button04" -%} {{ entity04 }} + {%- elif states(last_click) == "releasebuttonpage01button05" -%} {{ entity05 }} + {%- elif states(last_click) == "releasebuttonpage01button06" -%} {{ entity06 }} + {%- elif states(last_click) == "releasebuttonpage01button07" -%} {{ entity07 }} + {%- elif states(last_click) == "releasebuttonpage01button08" -%} {{ entity08 }} + {%- elif states(last_click) == "releasebuttonpage02button01" -%} {{ entity09 }} + {%- elif states(last_click) == "releasebuttonpage02button02" -%} {{ entity10 }} + {%- elif states(last_click) == "releasebuttonpage02button03" -%} {{ entity11 }} + {%- elif states(last_click) == "releasebuttonpage02button04" -%} {{ entity12 }} + {%- elif states(last_click) == "releasebuttonpage02button05" -%} {{ entity13 }} + {%- elif states(last_click) == "releasebuttonpage02button06" -%} {{ entity14 }} + {%- elif states(last_click) == "releasebuttonpage02button07" -%} {{ entity15 }} + {%- elif states(last_click) == "releasebuttonpage02button08" -%} {{ entity16 }} + {%- elif states(last_click) == "releasebuttonpage03button01" -%} {{ entity17 }} + {%- elif states(last_click) == "releasebuttonpage03button02" -%} {{ entity18 }} + {%- elif states(last_click) == "releasebuttonpage03button03" -%} {{ entity19 }} + {%- elif states(last_click) == "releasebuttonpage03button04" -%} {{ entity20 }} + {%- elif states(last_click) == "releasebuttonpage03button05" -%} {{ entity21 }} + {%- elif states(last_click) == "releasebuttonpage03button06" -%} {{ entity22 }} + {%- elif states(last_click) == "releasebuttonpage03button07" -%} {{ entity23 }} + {%- elif states(last_click) == "releasebuttonpage03button08" -%} {{ entity24 }} + {%- elif states(last_click) == "releasebuttonpage04button01" -%} {{ entity25 }} + {%- elif states(last_click) == "releasebuttonpage04button02" -%} {{ entity26 }} + {%- elif states(last_click) == "releasebuttonpage04button03" -%} {{ entity27 }} + {%- elif states(last_click) == "releasebuttonpage04button04" -%} {{ entity28 }} + {%- elif states(last_click) == "releasebuttonpage04button05" -%} {{ entity29 }} + {%- elif states(last_click) == "releasebuttonpage04button06" -%} {{ entity30 }} + {%- elif states(last_click) == "releasebuttonpage04button07" -%} {{ entity31 }} + {%- elif states(last_click) == "releasebuttonpage04button08" -%} {{ entity32 }} + {%- elif states(last_click) == "releasebuttonpage05button01" -%} {{ entity33 }} + {%- elif states(last_click) == "releasebuttonpage05button02" -%} {{ entity34 }} + {%- elif states(last_click) == "releasebuttonpage05button03" -%} {{ entity35 }} + {%- elif states(last_click) == "releasebuttonpage05button04" -%} {{ entity36 }} + {%- elif states(last_click) == "releasebuttonpage05button05" -%} {{ entity37 }} + {%- elif states(last_click) == "releasebuttonpage05button06" -%} {{ entity38 }} + {%- elif states(last_click) == "releasebuttonpage05button07" -%} {{ entity39 }} + {%- elif states(last_click) == "releasebuttonpage05button08" -%} {{ entity40 }} + {%- endif -%} + +##### Entity - Page Lightsettings ##### + entity_long: >- + {%- if states(last_click) == "pressbuttonpage01button01" -%} {{ entity01 }} + {%- elif states(last_click) == "pressbuttonpage01button02" -%} {{ entity02 }} + {%- elif states(last_click) == "pressbuttonpage01button03" -%} {{ entity03 }} + {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ entity04 }} + {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ entity05 }} + {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ entity06 }} + {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ entity07 }} + {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ entity08 }} + {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ entity09 }} + {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ entity10 }} + {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ entity11 }} + {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ entity12 }} + {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ entity13 }} + {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ entity14 }} + {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ entity15 }} + {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ entity16 }} + {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ entity17 }} + {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ entity18 }} + {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ entity19 }} + {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ entity20 }} + {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ entity21 }} + {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ entity22 }} + {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ entity23 }} + {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ entity24 }} + {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ entity25 }} + {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ entity26 }} + {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ entity27 }} + {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ entity28 }} + {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ entity29 }} + {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ entity30 }} + {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ entity31 }} + {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ entity32 }} + {%- elif states(last_click) == "pressbuttonpage05button01" -%} {{ entity33 }} + {%- elif states(last_click) == "pressbuttonpage05button02" -%} {{ entity34 }} + {%- elif states(last_click) == "pressbuttonpage05button03" -%} {{ entity35 }} + {%- elif states(last_click) == "pressbuttonpage05button04" -%} {{ entity36 }} + {%- elif states(last_click) == "pressbuttonpage05button05" -%} {{ entity37 }} + {%- elif states(last_click) == "pressbuttonpage05button06" -%} {{ entity38 }} + {%- elif states(last_click) == "pressbuttonpage05button07" -%} {{ entity39 }} + {%- elif states(last_click) == "pressbuttonpage05button08" -%} {{ entity40 }} + {%- 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" }} + {%- elif states(last_click) == "pressbuttonpage01button04" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button05" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button06" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button07" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage01button08" -%} {{ "page buttonpage01" }} + {%- elif states(last_click) == "pressbuttonpage02button01" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button02" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button03" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button04" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button05" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button06" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button07" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage02button08" -%} {{ "page buttonpage02" }} + {%- elif states(last_click) == "pressbuttonpage03button01" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button02" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button03" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button04" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button05" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button06" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button07" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage03button08" -%} {{ "page buttonpage03" }} + {%- elif states(last_click) == "pressbuttonpage04button01" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button02" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button03" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button04" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button05" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button06" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button07" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage04button08" -%} {{ "page buttonpage04" }} + {%- elif states(last_click) == "pressbuttonpage05button01" -%} {{ "page buttonpage05" }} + {%- elif states(last_click) == "pressbuttonpage05button02" -%} {{ "page buttonpage05" }} + {%- elif states(last_click) == "pressbuttonpage05button03" -%} {{ "page buttonpage05" }} + {%- elif states(last_click) == "pressbuttonpage05button04" -%} {{ "page buttonpage05" }} + {%- elif states(last_click) == "pressbuttonpage05button05" -%} {{ "page buttonpage05" }} + {%- elif states(last_click) == "pressbuttonpage05button06" -%} {{ "page buttonpage05" }} + {%- elif states(last_click) == "pressbuttonpage05button07" -%} {{ "page buttonpage05" }} + {%- elif states(last_click) == "pressbuttonpage05button08" -%} {{ "page buttonpage05" }} + {%- 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 + +##### Button04 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity04 + - condition: state + entity_id: !input entity04 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage01.button04 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity04 + - condition: state + entity_id: !input entity04 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage01.button04 + message: 0 + +##### Button05 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity05 + - condition: state + entity_id: !input entity05 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage01.button05 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity05 + - condition: state + entity_id: !input entity05 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage01.button05 + message: 0 + +##### Button06 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity06 + - condition: state + entity_id: !input entity06 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage01.button06 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity06 + - condition: state + entity_id: !input entity06 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage01.button06 + message: 0 + +##### Button07 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity07 + - condition: state + entity_id: !input entity07 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage01.button07 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity07 + - condition: state + entity_id: !input entity07 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage01.button07 + message: 0 + +##### Button08 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity08 + - condition: state + entity_id: !input entity08 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage01.button08 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity08 + - condition: state + entity_id: !input entity08 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage01.button08 + message: 0 + +##### Button09 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity09 + - condition: state + entity_id: !input entity09 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button01 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity09 + - condition: state + entity_id: !input entity09 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button01 + message: 0 + +##### Button10 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity10 + - condition: state + entity_id: !input entity10 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button02 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity10 + - condition: state + entity_id: !input entity10 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button02 + message: 0 + +##### Button11 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity11 + - condition: state + entity_id: !input entity11 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button03 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity11 + - condition: state + entity_id: !input entity11 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button03 + message: 0 + +##### Button12 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity12 + - condition: state + entity_id: !input entity12 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button04 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity12 + - condition: state + entity_id: !input entity12 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button04 + message: 0 + +##### Button13 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity13 + - condition: state + entity_id: !input entity13 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button05 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity13 + - condition: state + entity_id: !input entity13 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button05 + message: 0 + +##### Button14 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity14 + - condition: state + entity_id: !input entity14 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button06 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity14 + - condition: state + entity_id: !input entity14 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button06 + message: 0 + +##### Button15 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity15 + - condition: state + entity_id: !input entity15 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button07 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity16 + - condition: state + entity_id: !input entity16 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button07 + message: 0 + +##### Button16 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity16 + - condition: state + entity_id: !input entity16 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage02.button08 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity16 + - condition: state + entity_id: !input entity16 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage02.button08 + message: 0 + +##### Button17 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity17 + - condition: state + entity_id: !input entity17 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button01 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity17 + - condition: state + entity_id: !input entity17 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button01 + message: 0 + +##### Button18 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity18 + - condition: state + entity_id: !input entity18 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button02 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity18 + - condition: state + entity_id: !input entity18 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button02 + message: 0 + +##### Button19 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity19 + - condition: state + entity_id: !input entity19 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button03 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity19 + - condition: state + entity_id: !input entity19 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button03 + message: 0 + +##### Button20 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity20 + - condition: state + entity_id: !input entity20 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button04 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity20 + - condition: state + entity_id: !input entity20 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button04 + message: 0 + +##### Button21 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity21 + - condition: state + entity_id: !input entity21 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button05 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity21 + - condition: state + entity_id: !input entity21 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button05 + message: 0 + +##### Button22 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity22 + - condition: state + entity_id: !input entity22 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button06 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity22 + - condition: state + entity_id: !input entity22 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button06 + message: 0 + +##### Button23 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity23 + - condition: state + entity_id: !input entity23 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button07 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity23 + - condition: state + entity_id: !input entity23 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button07 + message: 0 + +##### Button24 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity24 + - condition: state + entity_id: !input entity24 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage03.button08 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity24 + - condition: state + entity_id: !input entity24 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage03.button08 + message: 0 + +##### Button25 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity25 + - condition: state + entity_id: !input entity25 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button01 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity25 + - condition: state + entity_id: !input entity25 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button01 + message: 0 + +##### Button26 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity26 + - condition: state + entity_id: !input entity26 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button02 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity26 + - condition: state + entity_id: !input entity26 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button02 + message: 0 + +##### Button27 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity27 + - condition: state + entity_id: !input entity27 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button03 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity27 + - condition: state + entity_id: !input entity27 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button03 + message: 0 + +##### Button28 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity28 + - condition: state + entity_id: !input entity28 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button04 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity28 + - condition: state + entity_id: !input entity28 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button04 + message: 0 + +##### Button29 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity29 + - condition: state + entity_id: !input entity29 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button05 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity29 + - condition: state + entity_id: !input entity29 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button05 + message: 0 + +##### Button30 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity30 + - condition: state + entity_id: !input entity30 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button06 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity30 + - condition: state + entity_id: !input entity30 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button06 + message: 0 + +##### Button31 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity31 + - condition: state + entity_id: !input entity31 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button07 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity31 + - condition: state + entity_id: !input entity31 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button07 + message: 0 + +##### Button32 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity32 + - condition: state + entity_id: !input entity32 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage04.button08 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity32 + - condition: state + entity_id: !input entity32 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage04.button08 + message: 0 + +##### Button33 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity33 + - condition: state + entity_id: !input entity33 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button01 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity33 + - condition: state + entity_id: !input entity33 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button01 + message: 0 + +##### Button34 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity34 + - condition: state + entity_id: !input entity34 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button02 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity34 + - condition: state + entity_id: !input entity34 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button02 + message: 0 + +##### Button35 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity35 + - condition: state + entity_id: !input entity35 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button03 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity35 + - condition: state + entity_id: !input entity35 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button03 + message: 0 + +##### Button36 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity36 + - condition: state + entity_id: !input entity36 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button04 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity36 + - condition: state + entity_id: !input entity36 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button04 + message: 0 + +##### Button37 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity37 + - condition: state + entity_id: !input entity37 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button05 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity37 + - condition: state + entity_id: !input entity37 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button05 + message: 0 + +##### Button38 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity38 + - condition: state + entity_id: !input entity38 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button06 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity38 + - condition: state + entity_id: !input entity38 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button06 + message: 0 + +##### Button39 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity39 + - condition: state + entity_id: !input entity39 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button07 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity39 + - condition: state + entity_id: !input entity39 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button07 + message: 0 + +##### Button40 ################################################################# + - choose: + - conditions: + - condition: trigger + id: current_state_entity40 + - condition: state + entity_id: !input entity40 + state: + - "on" + - "open" + sequence: + - service: !input command_value + data: + component: buttonpage05.button08 + message: 1 + - conditions: + - condition: trigger + id: current_state_entity40 + - condition: state + entity_id: !input entity40 + state: + - "off" + - "closed" + sequence: + - service: !input command_value + data: + component: buttonpage05.button08 + 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 ##### +############################################################# +# +## +### +############################################################################################################################################################################################# diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/climate.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/climate.yaml new file mode 100644 index 0000000..6a64410 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/climate.yaml @@ -0,0 +1,18 @@ +climate: + - platform: generic_thermostat + unique_id: cf308990-0dbd-4e8a-be77-aec56d7a5aa4 + name: NSPanel Büro + heater: switch.nspanel_buro_relay_2 + target_sensor: sensor.nspanel_buro_temperature + min_temp: 13 + max_temp: 27 + ac_mode: false + target_temp: 22 + cold_tolerance: 0.5 + hot_tolerance: 0.5 + min_cycle_duration: + seconds: 60 + keep_alive: + minutes: 3 + initial_hvac_mode: "heat" + precision: 0.5 diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/folder_watcher.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/folder_watcher.yaml new file mode 100644 index 0000000..4a503d1 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/folder_watcher.yaml @@ -0,0 +1,7 @@ +# Please insert into the default file "configuration.yaml +# Folder must be changed to the directory where the tft file (Nextion Editor) will be uploaded +########### +# +#Folder watcher for NS panel auto upload tft +folder_watcher: + - folder: /config/www/nspanel/ \ No newline at end of file diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/sensor.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/sensor.yaml new file mode 100644 index 0000000..1431ae1 --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/custom_configuration/sensor.yaml @@ -0,0 +1,78 @@ +##### Sensor ###### +sensor: + + - platform: template + sensors: + wochentag: + friendly_name: "Wochentag" + unique_id: 6ac64850-8563-456c-b562-92343dd96f0b + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,'] %} + {{ now().timestamp() | timestamp_custom(days[now().weekday()] ~ ' %d.%m')}} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag01: + friendly_name: "Wochentag+1" + unique_id: 6b2aad54-3eb0-48cc-ae32-ee3574197f1b + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,'] %} + {{(as_timestamp(now())+ (86400)) | timestamp_custom(days[now().weekday()+1] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag02: + friendly_name: "Wochentag+2" + unique_id: edbddaf0-2791-4774-b8d4-aa706f75cc7a + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,'] %} + {{(as_timestamp(now())+ (172800)) | timestamp_custom(days[now().weekday()+2] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag03: + friendly_name: "Wochentag+3" + unique_id: ad592622-db86-40f7-9961-4c1ffd21c711 + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,', 'Mittwoch,'] %} + {{(as_timestamp(now())+ (259200)) | timestamp_custom(days[now().weekday()+3] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag04: + friendly_name: "Wochentag+4" + unique_id: dcb3ed45-2b89-4672-a04f-a55f025ac745 + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,'] %} + {{(as_timestamp(now())+ (345600)) | timestamp_custom(days[now().weekday()+4] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + + - platform: template + sensors: + wochentag05: + friendly_name: "Wochentag+5" + unique_id: 77e642a5-de54-452d-9f4a-febe3a7851c2 + value_template: > + {% set days = ['Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,', 'Samstag,', 'Sonntag,', 'Montag,', 'Dienstag,', 'Mittwoch,', 'Donnerstag,', 'Freitag,'] %} + {{(as_timestamp(now())+ (432000)) | timestamp_custom(days[now().weekday()+ 5] ~ ' %d.%m') }} + icon_template: mdi:calendar-range + +###### NSPanel Büro - climate target temperature ##### + - platform: template + sensors: + nspanel_buro_target_temp: + unique_id: 2393ab74-21ce-42d3-b15e-ec162b9d6f31 + friendly_name: NSPanel Buro Target Temp + value_template: "{{ state_attr('climate.nspanel_buro', 'temperature') }}" + +###### NSPanel Büro - climate target temperature ##### + - platform: template + sensors: + nspanel_lea_target_temp: + unique_id: e8e61ff7-3a41-47ad-bd6c-303f730de96f + friendly_name: NSPanel Lea Target Temp + value_template: "{{ state_attr('climate.nspanel_lea', 'temperature') }}" \ No newline at end of file diff --git a/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/esphome.yaml b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/esphome.yaml new file mode 100644 index 0000000..ad8632d --- /dev/null +++ b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/esphome.yaml @@ -0,0 +1,1168 @@ +############################################################# +##### START - SUBSTITUTIONS ##### +############################################################# +substitutions: +##### GENEREL CONFIG ############################################################################################# + node_name: nspanel-buero # $node_name + device_name: NSPanel Büro # $device_name + + wifi_ssid: !secret wifi_ssid # add in your esphome secrets file. + wifi_password: !secret wifi_password # add in your esphome secrets file. + ota_password: !secret ota_password # add in your esphome secrets file. + nextion_update_url: !secret nextion_update_url_buero # add in your esphome secrets file. + +###### EDIT THE BELOW ENTITIES FOR YOURS... ####################################################################### + + #ha_weekday: sensor.wochentag ##### Sensor Wochentag generiert in HA (custom_configuration -> nspanel) ##### + #ha_outdoor_temp: sensor.terrasse_garage_motion_sensor_temperature ##### Temperatur von Bewegungsmelder Outdoor (Zigbee2Mqtt) ##### + #ha_hotwater_temp: sensor.hotwater_temp ##### Buderus Heizung Warmwasser Temperatur (Integration) ##### + ha_hotwater_charge: switch.charge + ha_heating_system_flame: binary_sensor.flamestatus ##### Buderus Heizung Flamen-Status (Integration) ##### + ha_climate_thermostat_target_temp: sensor.nspanel_buro_target_temp ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### + ha_climate_thermostat: climate.nspanel_buro ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### + #ha_humidity: sensor.kinderzimmer_lea_temperatur_sensor_humidity +######################################### +# +# +############################################################# +##### CLOSE - SUBSTITUTIONS ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - Settings ##### +############################################################# +# +# +######################################### + +##### Functionality for the Nextion display ##### +external_components: + - source: github://pr#2956 + components: [nextion] + refresh: 1h + +##### ESP home CONFIG ##### +esphome: + name: $node_name + comment: $device_name + +##### TYPE OF ESP BOARD ##### +esp32: + board: esp32dev + +##### WIFI SETUP ##### +wifi: + ssid: $wifi_ssid + password: $wifi_password + power_save_mode: none + +captive_portal: + +##### OTA (Over the air updates) password ##### +ota: + password: $ota_password + safe_mode: true + reboot_timeout: 3min + num_attempts: 3 + +##### LOGGER ##### +logger: +# baud_rate: 0 +# level: WARN + +##### CONFIGURE INTERNAL BUZZER ##### +output: + ##### BUZZER FOR PLAYING RINGTONES ##### + - platform: ledc + id: buzzer_out + pin: + number: 21 + +##### ENABLE RINGTONE MUSIC SUPPORT ##### +rtttl: + id: buzzer + output: buzzer_out + +##### UART FOR NEXTION DISPLAY ##### +uart: + tx_pin: 16 + rx_pin: 17 + baud_rate: 115200 + id: tf_uart + +##### INFO - Time component that fetches time from home Assistant and updates the display once a minute and when the display is ready at bootup (and time is available) ##### +#time: +# - platform: homeassistant +# id: homeassistant_time +# on_time: +# - seconds: 0 +# minutes: /1 +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a01", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute); +# on_time_sync: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a01", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute); + +###### A reboot button is always useful ##### +button: + - platform: restart + name: $device_name Restart + id: restart_nspanel + +######################################### +# +# +############################################################# +##### CLOSE - Settings ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - API ##### +############################################################# +# +# +######################################### + +api: + services: + +##### SERVICE TO UPDATE THE HMI FILE ##### + - service: upload_tft + then: + - lambda: 'id(disp1)->upload_tft();' + +##### Service to send a command "printf" directly to the display. Useful for testing ##### + - service: send_command_printf + variables: + cmd: string + then: + - lambda: 'id(disp1).send_command_printf("%s", cmd.c_str());' + +##### Service to send a command "text_printf" directly to the display. Useful for testing ##### + - service: send_command_text_printf + variables: + component: string + message: string + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());' + +##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_value + variables: + component: string + message: int + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_value(component.c_str(), message);' + +######################################### +# +# +############################################################# +##### CLOSE - API ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - GLOBALS ##### +############################################################# +# +# +######################################### + +globals: + +##### Save Target Temp ##### + - id: climate_target_temp_val_global + type: float + restore_value: true + initial_value: '12' + +##### Save Thermostat PIC Position ##### + - id: climate_slider_val_global + type: int + restore_value: true + initial_value: '0' + +##### Save Display Brightness for NSPanel reboot ##### + - id: display_brightness_global + type: int + restore_value: true + initial_value: '100' + +##### Save Display DIM Brightness for NSPanel reboot + - id: display_dim_brightness_global + type: int + restore_value: true + initial_value: '10' + +##### Save Display DIM Brightness for NSPanel reboot + - id: sleep_modus_global + type: int + restore_value: true + initial_value: '0' + +##### Save State Heating Room ##### + - id: heating_room_global + type: int + restore_value: true + initial_value: '0' + +##### Save State HVAC ##### + - id: hvac_mode_global + type: int + restore_value: true + initial_value: '0' + +######################################### +# +# +############################################################# +##### CLOSE - GLOBALS ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - BINARY SENSOR ##### +############################################################# +# +# +######################################### + +binary_sensor: + +###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY##### + - platform: gpio + name: $device_name Left Button + pin: + number: 14 + inverted: true + on_click: + - switch.toggle: relay_1 + +##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY ##### + - platform: gpio + name: $device_name Right Button + pin: + number: 27 + inverted: true + on_click: + - switch.toggle: relay_2 + +##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA ##### + - platform: nextion + name: $device_name Climate Target DOWN + page_id: 6 + component_id: 14 + internal: true + on_click: + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: $ha_climate_thermostat + temperature: !lambda return id(climate_target_temp_val_global) - 0.5; + +##### THERMOSTAT - BUTTON INCREASES CLIMATE TARGET TEMPERATURE IN HA ##### + - platform: nextion + name: $device_name Climate Target UP + page_id: 6 + component_id: 15 + internal: true + on_click: + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: $ha_climate_thermostat + temperature: !lambda return id(climate_target_temp_val_global) + 0.5; + +##### THERMOSTAT - BUTTON ON / OFF Heating ##### + - platform: nextion + name: $device_name Heating Room State + id: heating_room_state + page_id: 6 + component_id: 17 + internal: true + on_click: + - switch.toggle: hvac_mode + +##### Display Brightness - BUTTON DECREASES Brightness ##### + - platform: nextion + name: $device_name Brightness DOWN + page_id: 7 + component_id: 12 + internal: true + on_click: + - number.set: + id: display_brightness + value: !lambda return id(display_brightness_global) - 1; + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); + +##### Display Brightness - BUTTON INCREASES Brightness ##### + - platform: nextion + name: $device_name Brightness UP + page_id: 7 + component_id: 13 + internal: true + on_click: + - number.set: + id: display_brightness + value: !lambda return id(display_brightness_global) + 1; + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); + +##### Display DIM Brightness - BUTTON DECREASES Brightness ##### + - platform: nextion + name: $device_name Brightness DIM DOWN + page_id: 7 + component_id: 14 + internal: true + on_click: + - number.set: + id: display_dim_brightness + value: !lambda return id(display_dim_brightness_global) - 1; + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); + +##### Display DIM Brightness - BUTTON INCREASES Brightness ##### + - platform: nextion + name: $device_name Brightness DIM UP + page_id: 7 + component_id: 15 + internal: true + on_click: + - number.set: + id: display_dim_brightness + value: !lambda return id(display_dim_brightness_global) + 1; + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); + +##### Restart NSPanel Button ##### + - platform: nextion + name: $device_name Restart + page_id: 7 + component_id: 11 + internal: true + on_click: + - button.press: restart_nspanel + +##### Sleep Modus NSPanel Button ##### + - platform: nextion + name: $device_name Sleep Modus + page_id: 7 + component_id: 6 + internal: true + on_click: + - switch.toggle: sleep_modus + +##### Hotwater Charge ##### + - platform: nextion + name: $device_name Hotwater Charge + page_id: 6 + component_id: 22 + on_click: + - homeassistant.service: + service: switch.toggle + data: + entity_id: $ha_hotwater_charge + +######################################### +# +# +############################################################# +##### CLOSE - BINARY SENSOR ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - SENSOR ##### +############################################################# +# +# +######################################### + +sensor: + +##### INTERNAL TEMPERATUE SENSOR, ADC VALUE ##### + - platform: adc + id: ntc_source + pin: 38 + update_interval: 10s + attenuation: 11db + +##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)##### + - platform: resistance + id: resistance_sensor + sensor: ntc_source + configuration: DOWNSTREAM + resistor: 11.2kOhm + +##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) ##### + - platform: ntc + name: $device_name Temperature + id: temp_nspanel + sensor: resistance_sensor + calibration: + b_constant: 3950 + reference_temperature: 25°C + reference_resistance: 10kOhm + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: id(disp1).set_component_text_printf("home.a03", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page. + - lambda: id(disp1).set_component_text_printf("thermostat.a04", "%.1f", id(temp_nspanel).state); + +##### TEMPERATURE Outdoor FROM HA ##### +# - platform: homeassistant +# id: temp_outdoor +# entity_id: $ha_outdoor_temp +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a06", "%.0f°", id(temp_outdoor).state); +# - lambda: id(disp1).set_component_text_printf("thermostat.a07", "%.0f°", id(temp_outdoor).state); + +##### HUMIDITY Indoor FROM HA ##### +# - platform: homeassistant +# id: humidity +# entity_id: $ha_humidity +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a04", "%.0f°", id(humidity).state); + + +##### THERMOSTAT HOT WATER TEMP FROM HA ##### +# - platform: homeassistant +# id: temp_hotwater +# entity_id: $ha_hotwater_temp +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a07", "%.1f°", id(temp_hotwater).state); +# - lambda: id(disp1).set_component_text_printf("thermostat.a08", "%.1f°", id(temp_hotwater).state); + +##### THERMOSTAT CLIMATE TARGET TEMPERATURE FROM HA ##### + - platform: homeassistant + id: ha_climate_target_temp + entity_id: $ha_climate_thermostat_target_temp + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - globals.set: + id: climate_target_temp_val_global + value: !lambda 'return float(x);' + - lambda: id(disp1).set_component_text_printf("thermostat.a05", "%.1f", id(climate_target_temp_val_global)); + # THERMO PROGRESS CIRCLE, broken into 3 images to create space for the temperatures in the center. + - lambda: |- + int left=16; // 16 is empty left. + int mid=17; // 17 is empty mid. + int right=18; // 18 is empty right. + if (id(climate_target_temp_val_global) == 13) { + left=16; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 13.5) { + left=19; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 14) { + left=20; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 14.5) { + left=21; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 15) { + left=22; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 15.5) { + left=23; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 16) { + left=24; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 16.5) { + left=25; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 17) { + left=26; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 17.5) { + left=27; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 18) { + left=28; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 18.5) { + left=29; + mid=30; + right=18; + } else if (id(climate_target_temp_val_global) == 19) { + left=29; + mid=31; + right=18; + } else if (id(climate_target_temp_val_global) == 19.5) { + left=29; + mid=32; + right=18; + } else if (id(climate_target_temp_val_global) == 20) { + left=29; + mid=33; + right=18; + } else if (id(climate_target_temp_val_global) == 20.5) { + left=29; + mid=34; + right=18; + } else if (id(climate_target_temp_val_global) == 21) { + left=29; + mid=35; + right=18; + } else if (id(climate_target_temp_val_global) == 21.5) { + left=29; + mid=36; + right=18; + } else if (id(climate_target_temp_val_global) == 22) { + left=29; + mid=37; + right=38; + } else if (id(climate_target_temp_val_global) == 22.5) { + left=29; + mid=37; + right=39; + } else if (id(climate_target_temp_val_global) == 23) { + left=29; + mid=37; + right=40; + } else if (id(climate_target_temp_val_global) == 23.5) { + left=29; + mid=37; + right=41; + } else if (id(climate_target_temp_val_global) == 24) { + left=29; + mid=37; + right=42; + } else if (id(climate_target_temp_val_global) == 24.5) { + left=29; + mid=37; + right=43; + } else if (id(climate_target_temp_val_global) == 25) { + left=29; + mid=37; + right=44; + } else if (id(climate_target_temp_val_global) == 25.5) { + left=29; + mid=37; + right=45; + } else if (id(climate_target_temp_val_global) == 26) { + left=29; + mid=37; + right=46; + } else if (id(climate_target_temp_val_global) == 26.5) { + left=29; + mid=37; + right=47; + } else if (id(climate_target_temp_val_global) == 27) { + left=29; + mid=37; + right=48; + } + // sends the 3 images to the display + id(disp1).send_command_printf("thermostat.a01.pic=%i", left); + id(disp1).send_command_printf("thermostat.a02.pic=%i", mid); + id(disp1).send_command_printf("thermostat.a03.pic=%i", right); + +###### TARGET TEMPERATURE GET VALUE FROM NEXTION CIRCLE SLIDER AND SET GLOBAL VARIBLE ##### + - platform: nextion + id: climate_circleslider + name: $device_name Climate circleslider + variable_name: climateslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - globals.set: + id: climate_slider_val_global + value: !lambda 'return int(x);' + - lambda: |- + if (id(climate_slider_val_global) == 0) { + id(climate_target_temp_val_global) = 13; + } else if (id(climate_slider_val_global) == 1) { + id(climate_target_temp_val_global) = 13.5; + } else if (id(climate_slider_val_global) == 2) { + id(climate_target_temp_val_global) = 14; + } else if (id(climate_slider_val_global) == 3) { + id(climate_target_temp_val_global) = 14.5; + } else if (id(climate_slider_val_global) == 4) { + id(climate_target_temp_val_global) = 15; + } else if (id(climate_slider_val_global) == 5) { + id(climate_target_temp_val_global) = 15.5; + } else if (id(climate_slider_val_global) == 6) { + id(climate_target_temp_val_global) = 16; + } else if (id(climate_slider_val_global) == 7) { + id(climate_target_temp_val_global) = 16.5; + } else if (id(climate_slider_val_global) == 8) { + id(climate_target_temp_val_global) = 17; + } else if (id(climate_slider_val_global) == 9) { + id(climate_target_temp_val_global) = 17.5; + } else if (id(climate_slider_val_global) == 10) { + id(climate_target_temp_val_global) = 18; + } else if (id(climate_slider_val_global) == 11) { + id(climate_target_temp_val_global) = 18.5; + } else if (id(climate_slider_val_global) == 12) { + id(climate_target_temp_val_global) = 19; + } else if (id(climate_slider_val_global) == 13) { + id(climate_target_temp_val_global) = 19.5; + } else if (id(climate_slider_val_global) == 14) { + id(climate_target_temp_val_global) = 20; + } else if (id(climate_slider_val_global) == 15) { + id(climate_target_temp_val_global) = 20.5; + } else if (id(climate_slider_val_global) == 16) { + id(climate_target_temp_val_global) = 21; + } else if (id(climate_slider_val_global) == 17) { + id(climate_target_temp_val_global) = 21.5; + } else if (id(climate_slider_val_global) == 18) { + id(climate_target_temp_val_global) = 22; + } else if (id(climate_slider_val_global) == 19) { + id(climate_target_temp_val_global) = 22.5; + } else if (id(climate_slider_val_global) == 20) { + id(climate_target_temp_val_global) = 23; + } else if (id(climate_slider_val_global) == 21) { + id(climate_target_temp_val_global) = 23.5; + } else if (id(climate_slider_val_global) == 22) { + id(climate_target_temp_val_global) = 24; + } else if (id(climate_slider_val_global) == 23) { + id(climate_target_temp_val_global) = 24.5; + } else if (id(climate_slider_val_global) == 24) { + id(climate_target_temp_val_global) = 25; + } else if (id(climate_slider_val_global) == 25) { + id(climate_target_temp_val_global) = 25.5; + } else if (id(climate_slider_val_global) == 26) { + id(climate_target_temp_val_global) = 26; + } else if (id(climate_slider_val_global) == 27) { + id(climate_target_temp_val_global) = 26.5; + } else if (id(climate_slider_val_global) == 28) { + id(climate_target_temp_val_global) = 27; + } + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: $ha_climate_thermostat + temperature: !lambda return id(climate_target_temp_val_global); + +###### Display Brightness GET VALUE FROM NSPanel SLIDER ##### + - platform: nextion + id: brightslider + name: $device_name brightness Slider + variable_name: brightslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - number.set: + id: display_brightness + value: !lambda 'return int(x);' + # send text field percentage of current_lightslider_val + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + +###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER ##### + - platform: nextion + id: dimslider + name: $device_name dim brightness slider + variable_name: dimslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - number.set: + id: display_dim_brightness + value: !lambda 'return int(x);' + # send text field percentage of current_lightslider_val + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + + +######################################### +# +# +############################################################# +##### CLOSE - SENSOR ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - TEXT SENSOR##### +############################################################# +# +# +######################################### + +text_sensor: + +##### ESPhome version used to compile the app ##### + - platform: version + name: $device_name ESPhome Version + +##### SUN SENSOR FROM HA ##### + - platform: homeassistant + id: sun_sun + entity_id: sun.sun + +##### last click sensor, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: $device_name last click + id: disp1_last_click_va + update_interval: 50ms + component_name: lastclick + +##### last click lightsettings page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: $device_name last click lightsettings + id: disp1_last_click_lightsettings + update_interval: 50ms + component_name: lightsetting + +##### last click coversettings page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: $device_name last click coversettings + id: disp1_last_click_coversettings + update_interval: 50ms + component_name: coverposition + +##### Wochentag SENSOR FROM HA ##### +# - platform: homeassistant +# id: weekday +# entity_id: $ha_weekday +# on_value: +# then: +# - wait_until: +# switch.is_on: nextion_init +# - lambda: id(disp1).set_component_text_printf("home.a02", "%s", id(weekday).state.c_str()); + +##### HEATING System ICON ##### + - platform: homeassistant + entity_id: $ha_heating_system_flame + name: "Heating System" + id: heating_system + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + int symbol=60; // 60 is a blank image 30x30 + if (id(heating_system).state == "on") { + symbol=61; + } + id(disp1).send_command_printf("home.a50.pic=%i", symbol); + id(disp1).send_command_printf("thermostat.a50.pic=%i", symbol); + +##### Hotwater Charge ICON ##### + - platform: homeassistant + entity_id: $ha_hotwater_charge + name: "Hotwater Charge" + id: hotwater_charge + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + if (id(hotwater_charge).state == "on") { + id(disp1).set_component_value("thermostat.a12",1); + } else { + id(disp1).set_component_value("thermostat.a12",0); + } +# - lambda: |- +# id(disp1).set_component_value("thermostat.a12",0); +# if (id(hotwater_charge) == "on") +# { +# id(disp1).set_component_value("thermostat.a12",1); +# } + +##### WEATHER SYMBOL FROM HA WEATHER ENTITY ##### + - platform: homeassistant + id: weather_symbol + entity_id: weather.home_wetter + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + int symbol=1; // 1 is a empty box. + if (id(weather_symbol).state == "sunny") { + symbol=2; + } else if (id(weather_symbol).state == "cloudy") { + symbol=3; + if (id(sun_sun).state == "below_horizon") { + symbol=3; + } + } else if (id(weather_symbol).state == "rainy") { + symbol=4; + } else if (id(weather_symbol).state == "pouring") { + symbol=5; + } else if (id(weather_symbol).state == "snowy") { + symbol=6; + } else if (id(weather_symbol).state == "hail" || id(weather_symbol).state == "snowy-rainy") { + symbol=7; + } else if (id(weather_symbol).state == "fog") { + symbol=8; + } else if (id(weather_symbol).state == "windy" || id(weather_symbol).state == "windy-variant") { + symbol=9; + } else if (id(weather_symbol).state == "lightning") { + symbol=10; + } else if (id(weather_symbol).state == "partlycloudy") { + symbol=11; + if (id(sun_sun).state == "below_horizon") { + symbol=12; + } + } else if (id(weather_symbol).state == "lightning-rainy" || id(weather_symbol).state == "exceptional") { + symbol=13; + if (id(sun_sun).state == "below_horizon") { + symbol=14; + } + } else if (id(weather_symbol).state == "clear-night") { + symbol=15; + } + id(disp1).send_command_printf("home.a05.pic=%i", symbol); + +######################################### +# +# +############################################################# +##### CLOSE - TEXT SENSOR ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - SWITCH ##### +############################################################# +# +# +######################################### + +switch: + +##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display ##### + - platform: template + name: $device_name Nextion inited + id: nextion_init + entity_category: config + restore_state: false + assumed_state: off + optimistic: true + +##### UPDATE TFT DISPLAY ##### + - platform: template + name: Update TFT display + id: tft_update + turn_on_action: + - delay: 16ms + - lambda: id(disp1).upload_tft(); + - switch.turn_off: tft_update + +##### PHYSICAL SWITCH 1 ##### + - platform: gpio + name: $device_name Relay 1 + id: relay_1 + pin: + number: 22 + +##### PHYSICAL SWITCH 2 ###### + - platform: gpio + name: $device_name Relay 2 + id: relay_2 + pin: + number: 19 + on_turn_off: + - globals.set: + id: heating_room_global + value: '0' + - lambda: |- + if (id(hvac_mode_global) == 0) + { + id(disp1).send_command_printf("thermostat.a06.pic=51"); + } else if (id(hvac_mode_global) == 1) { + id(disp1).send_command_printf("thermostat.a06.pic=52"); + } + - lambda: id(disp1).send_command_printf("home.a52.pic=60"); + - lambda: id(disp1).send_command_printf("thermostat.a52.pic=60"); + on_turn_on: + - globals.set: + id: heating_room_global + value: '1' + - lambda: id(disp1).send_command_printf("thermostat.a06.pic=53"); + - lambda: id(disp1).send_command_printf("home.a52.pic=63"); + - lambda: id(disp1).send_command_printf("thermostat.a52.pic=63"); + +##### Switch Climate HVAC Mode ##### + - platform: template + device_class: switch + name: $device_name hvac Mode + id: hvac_mode + restore_state: true + assumed_state: false + optimistic: true + on_turn_off: + - lambda: id(disp1).set_component_value("thermostat.a10",0); + - globals.set: + id: hvac_mode_global + value: '0' + - homeassistant.service: + service: climate.set_hvac_mode + data_template: + entity_id: $ha_climate_thermostat + hvac_mode: 'off' + - lambda: id(disp1).send_command_printf("thermostat.a06.pic=51"); + - lambda: id(disp1).send_command_printf("home.a51.pic=60"); + - lambda: id(disp1).send_command_printf("thermostat.a51.pic=60"); + on_turn_on: + - lambda: id(disp1).set_component_value("thermostat.a10",1); + - globals.set: + id: hvac_mode_global + value: '1' + - homeassistant.service: + service: climate.set_hvac_mode + data_template: + entity_id: $ha_climate_thermostat + hvac_mode: 'heat' + - lambda: |- + if (id(heating_room_global) == 0) + { + id(disp1).send_command_printf("thermostat.a06.pic=52"); + } else if (id(heating_room_global) == 1) { + id(disp1).send_command_printf("thermostat.a06.pic=53"); + } + - lambda: id(disp1).send_command_printf("home.a51.pic=62"); + - lambda: id(disp1).send_command_printf("thermostat.a51.pic=62"); + +##### DISPLAY ALWAYS ON ##### + - platform: gpio + name: $device_name Screen Power + id: screen_power + entity_category: config + pin: + number: 4 + inverted: true + restore_mode: ALWAYS_ON + internal: true + +##### Switch Display Sleep Modus ##### + - platform: template + device_class: switch + name: $device_name Sleep Modus + id: sleep_modus + restore_state: true + assumed_state: false + optimistic: true + on_turn_off: + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=0"); + - globals.set: + id: sleep_modus_global + value: '0' + - lambda: id(disp1).set_component_value("settings.a02",0); + on_turn_on: + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=1"); + - globals.set: + id: sleep_modus_global + value: '1' + - lambda: id(disp1).set_component_value("settings.a02",1); + +######################################### +# +# +############################################################# +##### CLOSE - SWITCH ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - NUMBER ##### +############################################################# +# +# +######################################### + +number: + +##### SCREEN BRIGHTNESS ##### + - platform: template + name: $device_name Display Brightness + id: display_brightness + entity_category: config + unit_of_measurement: '%' + min_value: 1 + max_value: 100 + step: 1 + restore_value: true + optimistic: true + set_action: + then: + - lambda: 'id(disp1).set_backlight_brightness(x/100);' + - lambda: 'id(disp1).send_command_printf("home.brightness.val=%i", int(x));' + - globals.set: + id: display_brightness_global + value: !lambda 'return int(x);' + +##### SCREEN BRIGHTNESS DIMMED DOWN ##### + - platform: template + name: $device_name Display Brightness Dimdown + id: display_dim_brightness + entity_category: config + unit_of_measurement: '%' + min_value: 1 + max_value: 100 + step: 1 + restore_value: true + optimistic: true + set_action: + then: + - lambda: 'id(disp1).send_command_printf("home.brightdd.val=%i", int(x));' + - globals.set: + id: display_dim_brightness_global + value: !lambda 'return int(x);' + +######################################### +# +# +############################################################# +##### CLOSE - NUMBER ##### +############################################################# +# +## +### +############################################################################################################################################################################################# +### +## +# +############################################################# +##### START - DISPLAY START##### +############################################################# +# +# +######################################### + +display: + - platform: nextion + id: disp1 + uart_id: tf_uart + tft_url: $nextion_update_url + on_setup: + then: + - lambda: id(disp1).send_command_printf("page 9"); ##### CHANGE! - Loading page ##### + - wait_until: + api.connected + - delay: 0.5s + - rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6" + - delay: 0.5s + - switch.template.publish: + id: nextion_init + state: on + - lambda: id(disp1).send_command_printf("page 0"); #### home page ##### + - delay: 2s ##### gives the display time to update other components & set the home page ##### + - number.set: + id: display_brightness + value: !lambda 'return id(display_brightness_global);' + - number.set: + id: display_dim_brightness + value: !lambda 'return id(display_dim_brightness_global);' + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global)); + - lambda: |- + id(disp1).set_component_value("settings.a02",0); + if (id(sleep_modus_global) == 1) + { + id(disp1).set_component_value("settings.a02",1); + } + - lambda: |- + id(disp1).send_command_printf("home.a50.pic=60"); + id(disp1).send_command_printf("thermostat.a50.pic=60"); + id(disp1).send_command_printf("thermostat.a06.pic=52"); + if (id(heating_room_global) == 1) + { + id(disp1).send_command_printf("home.a52.pic=63"); + id(disp1).send_command_printf("thermostat.a52.pic=63"); + id(disp1).send_command_printf("thermostat.a06.pic=53"); + } + - lambda: |- + if (id(hvac_mode_global) == 0) { + id(disp1).send_command_printf("home.a51.pic=60"); + id(disp1).send_command_printf("thermostat.a51.pic=60"); + id(disp1).send_command_printf("thermostat.a06.pic=51"); + } else if (id(hvac_mode_global) == 1) { + id(disp1).send_command_printf("home.a51.pic=62"); + id(disp1).send_command_printf("thermostat.a51.pic=62"); + id(disp1).set_component_value("thermostat.a10",1); + } + +############################################################# +##### CLOSE - DISPLAY START ##### +############################################################# diff --git a/nspanel_buero.tft b/custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/nspanel_buero.tft similarity index 100% rename from nspanel_buero.tft rename to custom_configuration/OLD NSPanel version/NSPanel_HA_Blueprint-main/nspanel_buero.tft diff --git a/esphome.yaml b/esphome.yaml index ad8632d..20e36ec 100644 --- a/esphome.yaml +++ b/esphome.yaml @@ -1,1168 +1,1164 @@ ############################################################# ##### START - SUBSTITUTIONS ##### ############################################################# -substitutions: -##### GENEREL CONFIG ############################################################################################# - node_name: nspanel-buero # $node_name - device_name: NSPanel Büro # $device_name - - wifi_ssid: !secret wifi_ssid # add in your esphome secrets file. - wifi_password: !secret wifi_password # add in your esphome secrets file. - ota_password: !secret ota_password # add in your esphome secrets file. - nextion_update_url: !secret nextion_update_url_buero # add in your esphome secrets file. - -###### EDIT THE BELOW ENTITIES FOR YOURS... ####################################################################### - - #ha_weekday: sensor.wochentag ##### Sensor Wochentag generiert in HA (custom_configuration -> nspanel) ##### - #ha_outdoor_temp: sensor.terrasse_garage_motion_sensor_temperature ##### Temperatur von Bewegungsmelder Outdoor (Zigbee2Mqtt) ##### - #ha_hotwater_temp: sensor.hotwater_temp ##### Buderus Heizung Warmwasser Temperatur (Integration) ##### - ha_hotwater_charge: switch.charge - ha_heating_system_flame: binary_sensor.flamestatus ##### Buderus Heizung Flamen-Status (Integration) ##### - ha_climate_thermostat_target_temp: sensor.nspanel_buro_target_temp ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### - ha_climate_thermostat: climate.nspanel_buro ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### - #ha_humidity: sensor.kinderzimmer_lea_temperatur_sensor_humidity -######################################### -# -# -############################################################# -##### CLOSE - SUBSTITUTIONS ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - Settings ##### -############################################################# -# -# -######################################### - -##### Functionality for the Nextion display ##### -external_components: - - source: github://pr#2956 - components: [nextion] - refresh: 1h - -##### ESP home CONFIG ##### -esphome: - name: $node_name - comment: $device_name - -##### TYPE OF ESP BOARD ##### -esp32: - board: esp32dev - -##### WIFI SETUP ##### -wifi: - ssid: $wifi_ssid - password: $wifi_password - power_save_mode: none - -captive_portal: - -##### OTA (Over the air updates) password ##### -ota: - password: $ota_password - safe_mode: true - reboot_timeout: 3min - num_attempts: 3 - -##### LOGGER ##### -logger: -# baud_rate: 0 -# level: WARN - -##### CONFIGURE INTERNAL BUZZER ##### -output: - ##### BUZZER FOR PLAYING RINGTONES ##### - - platform: ledc - id: buzzer_out - pin: - number: 21 - -##### ENABLE RINGTONE MUSIC SUPPORT ##### -rtttl: - id: buzzer - output: buzzer_out - -##### UART FOR NEXTION DISPLAY ##### -uart: - tx_pin: 16 - rx_pin: 17 - baud_rate: 115200 - id: tf_uart - -##### INFO - Time component that fetches time from home Assistant and updates the display once a minute and when the display is ready at bootup (and time is available) ##### -#time: -# - platform: homeassistant -# id: homeassistant_time -# on_time: -# - seconds: 0 -# minutes: /1 -# then: -# - wait_until: -# switch.is_on: nextion_init -# - lambda: id(disp1).set_component_text_printf("home.a01", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute); -# on_time_sync: -# then: -# - wait_until: -# switch.is_on: nextion_init -# - lambda: id(disp1).set_component_text_printf("home.a01", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute); - -###### A reboot button is always useful ##### -button: - - platform: restart - name: $device_name Restart - id: restart_nspanel - -######################################### -# -# -############################################################# -##### CLOSE - Settings ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - API ##### -############################################################# -# -# -######################################### - -api: - services: - -##### SERVICE TO UPDATE THE HMI FILE ##### - - service: upload_tft - then: - - lambda: 'id(disp1)->upload_tft();' - -##### Service to send a command "printf" directly to the display. Useful for testing ##### - - service: send_command_printf - variables: - cmd: string - then: - - lambda: 'id(disp1).send_command_printf("%s", cmd.c_str());' - -##### Service to send a command "text_printf" directly to the display. Useful for testing ##### - - service: send_command_text_printf - variables: - component: string - message: string - then: - - wait_until: - switch.is_on: nextion_init - - lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());' - -##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### - - service: send_command_value - variables: - component: string - message: int - then: - - wait_until: - switch.is_on: nextion_init - - lambda: 'id(disp1).set_component_value(component.c_str(), message);' - -######################################### -# -# -############################################################# -##### CLOSE - API ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - GLOBALS ##### -############################################################# -# -# -######################################### - -globals: - -##### Save Target Temp ##### - - id: climate_target_temp_val_global - type: float - restore_value: true - initial_value: '12' - -##### Save Thermostat PIC Position ##### - - id: climate_slider_val_global - type: int - restore_value: true - initial_value: '0' - -##### Save Display Brightness for NSPanel reboot ##### - - id: display_brightness_global - type: int - restore_value: true - initial_value: '100' - -##### Save Display DIM Brightness for NSPanel reboot - - id: display_dim_brightness_global - type: int - restore_value: true - initial_value: '10' - -##### Save Display DIM Brightness for NSPanel reboot - - id: sleep_modus_global - type: int - restore_value: true - initial_value: '0' - -##### Save State Heating Room ##### - - id: heating_room_global - type: int - restore_value: true - initial_value: '0' - -##### Save State HVAC ##### - - id: hvac_mode_global - type: int - restore_value: true - initial_value: '0' - -######################################### -# -# -############################################################# -##### CLOSE - GLOBALS ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - BINARY SENSOR ##### -############################################################# -# -# -######################################### - -binary_sensor: - -###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY##### - - platform: gpio - name: $device_name Left Button - pin: - number: 14 - inverted: true - on_click: - - switch.toggle: relay_1 - -##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY ##### - - platform: gpio - name: $device_name Right Button - pin: - number: 27 - inverted: true - on_click: - - switch.toggle: relay_2 - -##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA ##### - - platform: nextion - name: $device_name Climate Target DOWN - page_id: 6 - component_id: 14 - internal: true - on_click: - - homeassistant.service: - service: climate.set_temperature - data_template: - entity_id: $ha_climate_thermostat - temperature: !lambda return id(climate_target_temp_val_global) - 0.5; - -##### THERMOSTAT - BUTTON INCREASES CLIMATE TARGET TEMPERATURE IN HA ##### - - platform: nextion - name: $device_name Climate Target UP - page_id: 6 - component_id: 15 - internal: true - on_click: - - homeassistant.service: - service: climate.set_temperature - data_template: - entity_id: $ha_climate_thermostat - temperature: !lambda return id(climate_target_temp_val_global) + 0.5; - -##### THERMOSTAT - BUTTON ON / OFF Heating ##### - - platform: nextion - name: $device_name Heating Room State - id: heating_room_state - page_id: 6 - component_id: 17 - internal: true - on_click: - - switch.toggle: hvac_mode - -##### Display Brightness - BUTTON DECREASES Brightness ##### - - platform: nextion - name: $device_name Brightness DOWN - page_id: 7 - component_id: 12 - internal: true - on_click: - - number.set: - id: display_brightness - value: !lambda return id(display_brightness_global) - 1; - - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); - - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); - -##### Display Brightness - BUTTON INCREASES Brightness ##### - - platform: nextion - name: $device_name Brightness UP - page_id: 7 - component_id: 13 - internal: true - on_click: - - number.set: - id: display_brightness - value: !lambda return id(display_brightness_global) + 1; - - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); - - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); - -##### Display DIM Brightness - BUTTON DECREASES Brightness ##### - - platform: nextion - name: $device_name Brightness DIM DOWN - page_id: 7 - component_id: 14 - internal: true - on_click: - - number.set: - id: display_dim_brightness - value: !lambda return id(display_dim_brightness_global) - 1; - - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); - - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); - -##### Display DIM Brightness - BUTTON INCREASES Brightness ##### - - platform: nextion - name: $device_name Brightness DIM UP - page_id: 7 - component_id: 15 - internal: true - on_click: - - number.set: - id: display_dim_brightness - value: !lambda return id(display_dim_brightness_global) + 1; - - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); - - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); - -##### Restart NSPanel Button ##### - - platform: nextion - name: $device_name Restart - page_id: 7 - component_id: 11 - internal: true - on_click: - - button.press: restart_nspanel - -##### Sleep Modus NSPanel Button ##### - - platform: nextion - name: $device_name Sleep Modus - page_id: 7 - component_id: 6 - internal: true - on_click: - - switch.toggle: sleep_modus - -##### Hotwater Charge ##### - - platform: nextion - name: $device_name Hotwater Charge - page_id: 6 - component_id: 22 - on_click: - - homeassistant.service: - service: switch.toggle - data: - entity_id: $ha_hotwater_charge - -######################################### -# -# -############################################################# -##### CLOSE - BINARY SENSOR ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - SENSOR ##### -############################################################# -# -# -######################################### - -sensor: - -##### INTERNAL TEMPERATUE SENSOR, ADC VALUE ##### - - platform: adc - id: ntc_source - pin: 38 - update_interval: 10s - attenuation: 11db - -##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)##### - - platform: resistance - id: resistance_sensor - sensor: ntc_source - configuration: DOWNSTREAM - resistor: 11.2kOhm - -##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) ##### - - platform: ntc - name: $device_name Temperature - id: temp_nspanel - sensor: resistance_sensor - calibration: - b_constant: 3950 - reference_temperature: 25°C - reference_resistance: 10kOhm - on_value: - then: - - wait_until: - switch.is_on: nextion_init - - lambda: id(disp1).set_component_text_printf("home.a03", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page. - - lambda: id(disp1).set_component_text_printf("thermostat.a04", "%.1f", id(temp_nspanel).state); - -##### TEMPERATURE Outdoor FROM HA ##### -# - platform: homeassistant -# id: temp_outdoor -# entity_id: $ha_outdoor_temp -# on_value: -# then: -# - wait_until: -# switch.is_on: nextion_init -# - lambda: id(disp1).set_component_text_printf("home.a06", "%.0f°", id(temp_outdoor).state); -# - lambda: id(disp1).set_component_text_printf("thermostat.a07", "%.0f°", id(temp_outdoor).state); - -##### HUMIDITY Indoor FROM HA ##### -# - platform: homeassistant -# id: humidity -# entity_id: $ha_humidity -# on_value: -# then: -# - wait_until: -# switch.is_on: nextion_init -# - lambda: id(disp1).set_component_text_printf("home.a04", "%.0f°", id(humidity).state); -##### THERMOSTAT HOT WATER TEMP FROM HA ##### -# - platform: homeassistant -# id: temp_hotwater -# entity_id: $ha_hotwater_temp -# on_value: -# then: -# - wait_until: -# switch.is_on: nextion_init -# - lambda: id(disp1).set_component_text_printf("home.a07", "%.1f°", id(temp_hotwater).state); -# - lambda: id(disp1).set_component_text_printf("thermostat.a08", "%.1f°", id(temp_hotwater).state); - -##### THERMOSTAT CLIMATE TARGET TEMPERATURE FROM HA ##### - - platform: homeassistant - id: ha_climate_target_temp - entity_id: $ha_climate_thermostat_target_temp - on_value: - then: - - wait_until: - switch.is_on: nextion_init - - globals.set: - id: climate_target_temp_val_global - value: !lambda 'return float(x);' - - lambda: id(disp1).set_component_text_printf("thermostat.a05", "%.1f", id(climate_target_temp_val_global)); - # THERMO PROGRESS CIRCLE, broken into 3 images to create space for the temperatures in the center. - - lambda: |- - int left=16; // 16 is empty left. - int mid=17; // 17 is empty mid. - int right=18; // 18 is empty right. - if (id(climate_target_temp_val_global) == 13) { - left=16; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 13.5) { - left=19; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 14) { - left=20; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 14.5) { - left=21; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 15) { - left=22; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 15.5) { - left=23; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 16) { - left=24; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 16.5) { - left=25; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 17) { - left=26; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 17.5) { - left=27; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 18) { - left=28; - mid=17; - right=18; - } else if (id(climate_target_temp_val_global) == 18.5) { - left=29; - mid=30; - right=18; - } else if (id(climate_target_temp_val_global) == 19) { - left=29; - mid=31; - right=18; - } else if (id(climate_target_temp_val_global) == 19.5) { - left=29; - mid=32; - right=18; - } else if (id(climate_target_temp_val_global) == 20) { - left=29; - mid=33; - right=18; - } else if (id(climate_target_temp_val_global) == 20.5) { - left=29; - mid=34; - right=18; - } else if (id(climate_target_temp_val_global) == 21) { - left=29; - mid=35; - right=18; - } else if (id(climate_target_temp_val_global) == 21.5) { - left=29; - mid=36; - right=18; - } else if (id(climate_target_temp_val_global) == 22) { - left=29; - mid=37; - right=38; - } else if (id(climate_target_temp_val_global) == 22.5) { - left=29; - mid=37; - right=39; - } else if (id(climate_target_temp_val_global) == 23) { - left=29; - mid=37; - right=40; - } else if (id(climate_target_temp_val_global) == 23.5) { - left=29; - mid=37; - right=41; - } else if (id(climate_target_temp_val_global) == 24) { - left=29; - mid=37; - right=42; - } else if (id(climate_target_temp_val_global) == 24.5) { - left=29; - mid=37; - right=43; - } else if (id(climate_target_temp_val_global) == 25) { - left=29; - mid=37; - right=44; - } else if (id(climate_target_temp_val_global) == 25.5) { - left=29; - mid=37; - right=45; - } else if (id(climate_target_temp_val_global) == 26) { - left=29; - mid=37; - right=46; - } else if (id(climate_target_temp_val_global) == 26.5) { - left=29; - mid=37; - right=47; - } else if (id(climate_target_temp_val_global) == 27) { - left=29; - mid=37; - right=48; - } - // sends the 3 images to the display - id(disp1).send_command_printf("thermostat.a01.pic=%i", left); - id(disp1).send_command_printf("thermostat.a02.pic=%i", mid); - id(disp1).send_command_printf("thermostat.a03.pic=%i", right); - -###### TARGET TEMPERATURE GET VALUE FROM NEXTION CIRCLE SLIDER AND SET GLOBAL VARIBLE ##### - - platform: nextion - id: climate_circleslider - name: $device_name Climate circleslider - variable_name: climateslider - internal: true - on_value: - then: - - wait_until: - switch.is_on: nextion_init - - globals.set: - id: climate_slider_val_global - value: !lambda 'return int(x);' - - lambda: |- - if (id(climate_slider_val_global) == 0) { - id(climate_target_temp_val_global) = 13; - } else if (id(climate_slider_val_global) == 1) { - id(climate_target_temp_val_global) = 13.5; - } else if (id(climate_slider_val_global) == 2) { - id(climate_target_temp_val_global) = 14; - } else if (id(climate_slider_val_global) == 3) { - id(climate_target_temp_val_global) = 14.5; - } else if (id(climate_slider_val_global) == 4) { - id(climate_target_temp_val_global) = 15; - } else if (id(climate_slider_val_global) == 5) { - id(climate_target_temp_val_global) = 15.5; - } else if (id(climate_slider_val_global) == 6) { - id(climate_target_temp_val_global) = 16; - } else if (id(climate_slider_val_global) == 7) { - id(climate_target_temp_val_global) = 16.5; - } else if (id(climate_slider_val_global) == 8) { - id(climate_target_temp_val_global) = 17; - } else if (id(climate_slider_val_global) == 9) { - id(climate_target_temp_val_global) = 17.5; - } else if (id(climate_slider_val_global) == 10) { - id(climate_target_temp_val_global) = 18; - } else if (id(climate_slider_val_global) == 11) { - id(climate_target_temp_val_global) = 18.5; - } else if (id(climate_slider_val_global) == 12) { - id(climate_target_temp_val_global) = 19; - } else if (id(climate_slider_val_global) == 13) { - id(climate_target_temp_val_global) = 19.5; - } else if (id(climate_slider_val_global) == 14) { - id(climate_target_temp_val_global) = 20; - } else if (id(climate_slider_val_global) == 15) { - id(climate_target_temp_val_global) = 20.5; - } else if (id(climate_slider_val_global) == 16) { - id(climate_target_temp_val_global) = 21; - } else if (id(climate_slider_val_global) == 17) { - id(climate_target_temp_val_global) = 21.5; - } else if (id(climate_slider_val_global) == 18) { - id(climate_target_temp_val_global) = 22; - } else if (id(climate_slider_val_global) == 19) { - id(climate_target_temp_val_global) = 22.5; - } else if (id(climate_slider_val_global) == 20) { - id(climate_target_temp_val_global) = 23; - } else if (id(climate_slider_val_global) == 21) { - id(climate_target_temp_val_global) = 23.5; - } else if (id(climate_slider_val_global) == 22) { - id(climate_target_temp_val_global) = 24; - } else if (id(climate_slider_val_global) == 23) { - id(climate_target_temp_val_global) = 24.5; - } else if (id(climate_slider_val_global) == 24) { - id(climate_target_temp_val_global) = 25; - } else if (id(climate_slider_val_global) == 25) { - id(climate_target_temp_val_global) = 25.5; - } else if (id(climate_slider_val_global) == 26) { - id(climate_target_temp_val_global) = 26; - } else if (id(climate_slider_val_global) == 27) { - id(climate_target_temp_val_global) = 26.5; - } else if (id(climate_slider_val_global) == 28) { - id(climate_target_temp_val_global) = 27; - } + ##### advanced config activate only when you know what you do ##### +# substitutions: + # ## usage of secrets-file ## -> comment in ###### Change ME ###### + # device_name: "nspanel-name" # ändere Name zum Beispiel in den Raum wo das NSPanel verbaut wird. Wird im Blueprint benötigt + # friendly_name: "NSPanel Name" # ändere Name zum Beispiel in den Raum wo das NSPanel verbaut wird + # wifi_ssid: !secret nspanel_wifi_ssid # add in your esphome secrets file. + # wifi_password: !secret nspanel_wifi_password # add in your esphome secrets file. + # ota_password: !secret nspanel_ota_password # add in your esphome secrets file. + # nextion_update_url: !secret nspanel_update_url # add in your esphome secrets file. Example: "http://"HOME ASSISTANT IP":8123/local/nspanel/nspanel.tft" + + # ## static ip config ## + # ip: "10.0.0.7" + # gw: "10.0.0.138" + # subnet: "255.255.255.0" + # dns: "10.0.0.138" + # domain: ".local" + + ##### end of advanced config ##### + + ###### EDIT THE BELOW ENTITIES FOR YOURS... depricated ####################################################################### + ##### - will be removed in future release - ignore it or set if exist ################## + # ha_hotwater_charge: switch.wwcharge + # ha_heating_system_flame: binary_sensor.flamestatus ##### Buderus Heizung Flamen-Status (Integration) ##### + # ha_climate_thermostat_target_temp: sensor.nspanel_target_temp ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### + # ha_climate_thermostat: climate.nspanel_name ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) ##### + ######################################### + # + # + ############################################################# + ##### CLOSE - SUBSTITUTIONS ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - Settings ##### + ############################################################# + # + # + ######################################### + + ##### Functionality for the Nextion display ##### + external_components: + - source: github://pr#2956 + components: [nextion] + refresh: 1h + + ##### ESP home CONFIG ##### + esphome: + name: ${device_name} + comment: ${friendly_name} + + ##### TYPE OF ESP BOARD ##### + esp32: + board: esp32dev + + ##### WIFI SETUP ##### + wifi: + ssid: ${wifi_ssid} + password: ${wifi_password} + power_save_mode: none + ##### advanced config - uncomment to use static IP-Config ##### + # manual_ip: + # static_ip: ${ip} + # gateway: ${gw} + # subnet: ${subnet} + # dns1: ${dns} + # domain: ${domain} + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "${device_name}" + password: ${wifi_password} + + captive_portal: + + web_server: + port: 80 + auth: + username: admin + password: ${ota_password} + + ##### OTA (Over the air updates) password ##### + ota: + password: ${ota_password} + safe_mode: true + reboot_timeout: 3min + num_attempts: 3 + + ##### LOGGER ##### + logger: + # baud_rate: 0 + # level: WARN + + ##### CONFIGURE INTERNAL BUZZER ##### + output: + ##### BUZZER FOR PLAYING RINGTONES ##### + - platform: ledc + id: buzzer_out + pin: + number: 21 + + ##### ENABLE RINGTONE MUSIC SUPPORT ##### + rtttl: + id: buzzer + output: buzzer_out + + ##### UART FOR NEXTION DISPLAY ##### + uart: + tx_pin: 16 + rx_pin: 17 + baud_rate: 115200 + id: tf_uart + + ###### A reboot button is always useful ##### + button: + - platform: restart + name: ${device_name} Restart + id: restart_nspanel + + + + + ######################################### + # + # + ############################################################# + ##### CLOSE - Settings ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - API ##### + ############################################################# + # + # + ######################################### + + api: + services: + + ##### SERVICE TO UPDATE THE HMI FILE ##### + - service: upload_tft + then: + - lambda: 'id(disp1)->upload_tft();' + + ##### Service to send a command "printf" directly to the display. Useful for testing ##### + - service: send_command_printf + variables: + cmd: string + then: + - lambda: 'id(disp1).send_command_printf("%s", cmd.c_str());' + + ##### Service to send a command "text_printf" directly to the display. Useful for testing ##### + - service: send_command_text_printf + variables: + component: string + message: string + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());' + + ##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_value + variables: + component: string + message: int + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_value(component.c_str(), message);' + + ##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_hide + variables: + component: string + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).hide_component(component.c_str());' + + ##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_font_color + variables: + component: string + message: int + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_font_color(component.c_str(), message);' + ##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing ##### + - service: send_command_background_color + variables: + component: string + message: int + then: + - wait_until: + switch.is_on: nextion_init + - lambda: 'id(disp1).set_component_background_color(component.c_str(), message);' + + ######################################### + # + # + ############################################################# + ##### CLOSE - API ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - GLOBALS ##### + ############################################################# + # + # + ######################################### + + globals: + + ##### Save Target Temp ##### + - id: climate_target_temp_val_global + type: float + restore_value: true + initial_value: '12' + + ##### Save Thermostat PIC Position ##### + - id: climate_slider_val_global + type: int + restore_value: true + initial_value: '0' + + ##### Save Display Brightness for NSPanel reboot ##### + - id: display_brightness_global + type: int + restore_value: true + initial_value: '100' + + ##### Save Display DIM Brightness for NSPanel reboot + - id: display_dim_brightness_global + type: int + restore_value: true + initial_value: '10' + + ##### Save Display DIM Brightness for NSPanel reboot + - id: sleep_modus_global + type: int + restore_value: true + initial_value: '0' + + ##### Save State Heating Room ##### + - id: heating_room_global + type: int + restore_value: true + initial_value: '0' + + ##### Save State HVAC ##### + - id: hvac_mode_global + type: int + restore_value: true + initial_value: '0' + + ##### lastclick State ##### + - id: lastclick_global + type: std::string + restore_value: no + initial_value: '' + + ##### lastclick State ##### + - id: last_click_lightsettings + type: std::string + restore_value: no + initial_value: '' + + ##### lastclick State ##### + - id: last_click_coversettings + type: std::string + restore_value: no + initial_value: '' + + ##### lastclick State ##### + - id: last_click_weathersettings + type: std::string + restore_value: no + initial_value: '' + + ######################################### + # + # + ############################################################# + ##### CLOSE - GLOBALS ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - BINARY SENSOR ##### + ############################################################# + # + # + ######################################### + + binary_sensor: + + ###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY##### + - platform: gpio + name: ${device_name} Left Button + pin: + number: 14 + inverted: true + # on_click: + # - switch.toggle: relay_1 + + ##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY ##### + - platform: gpio + name: ${device_name} Right Button + pin: + number: 27 + inverted: true + # on_click: + # - switch.toggle: relay_2 + + ##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA ##### + - platform: nextion + name: ${device_name} Climate Target DOWN + page_id: 6 + component_id: 13 + internal: true + on_click: - homeassistant.service: service: climate.set_temperature data_template: - entity_id: $ha_climate_thermostat - temperature: !lambda return id(climate_target_temp_val_global); - -###### Display Brightness GET VALUE FROM NSPanel SLIDER ##### - - platform: nextion - id: brightslider - name: $device_name brightness Slider - variable_name: brightslider - internal: true - on_value: - then: - - wait_until: - switch.is_on: nextion_init - - number.set: - id: display_brightness - value: !lambda 'return int(x);' - # send text field percentage of current_lightslider_val - - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); - -###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER ##### - - platform: nextion - id: dimslider - name: $device_name dim brightness slider - variable_name: dimslider - internal: true - on_value: - then: - - wait_until: - switch.is_on: nextion_init - - number.set: - id: display_dim_brightness - value: !lambda 'return int(x);' - # send text field percentage of current_lightslider_val - - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); - - -######################################### -# -# -############################################################# -##### CLOSE - SENSOR ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - TEXT SENSOR##### -############################################################# -# -# -######################################### - -text_sensor: - -##### ESPhome version used to compile the app ##### - - platform: version - name: $device_name ESPhome Version - -##### SUN SENSOR FROM HA ##### - - platform: homeassistant - id: sun_sun - entity_id: sun.sun - -##### last click sensor, the main action variable - push to HA ##### - - platform: nextion - nextion_id: disp1 - name: $device_name last click - id: disp1_last_click_va - update_interval: 50ms - component_name: lastclick + entity_id: ${ha_climate_thermostat} + temperature: !lambda return id(climate_target_temp_val_global) - 0.5; + + ##### THERMOSTAT - BUTTON INCREASES CLIMATE TARGET TEMPERATURE IN HA ##### + - platform: nextion + name: ${device_name} Climate Target UP + page_id: 6 + component_id: 14 + internal: true + on_click: + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: ${ha_climate_thermostat} + temperature: !lambda return id(climate_target_temp_val_global) + 0.5; -##### last click lightsettings page, the main action variable - push to HA ##### - - platform: nextion - nextion_id: disp1 - name: $device_name last click lightsettings - id: disp1_last_click_lightsettings - update_interval: 50ms - component_name: lightsetting - -##### last click coversettings page, the main action variable - push to HA ##### - - platform: nextion - nextion_id: disp1 - name: $device_name last click coversettings - id: disp1_last_click_coversettings - update_interval: 50ms - component_name: coverposition - -##### Wochentag SENSOR FROM HA ##### -# - platform: homeassistant -# id: weekday -# entity_id: $ha_weekday -# on_value: -# then: -# - wait_until: -# switch.is_on: nextion_init -# - lambda: id(disp1).set_component_text_printf("home.a02", "%s", id(weekday).state.c_str()); - -##### HEATING System ICON ##### - - platform: homeassistant - entity_id: $ha_heating_system_flame - name: "Heating System" - id: heating_system - on_value: - then: - - wait_until: - switch.is_on: nextion_init + ##### THERMOSTAT - BUTTON ON / OFF Heating ##### + - platform: nextion + name: ${device_name} Heating Room State + id: heating_room_state + page_id: 6 + component_id: 16 + internal: true + on_click: + - switch.toggle: hvac_mode + + ##### Restart NSPanel Button ##### + - platform: nextion + name: ${device_name} Restart + page_id: 7 + component_id: 10 + internal: true + on_click: + - button.press: restart_nspanel + + ##### Sleep Modus NSPanel Button ##### + - platform: nextion + name: ${device_name} Sleep Modus + page_id: 7 + component_id: 5 + internal: true + on_click: + - switch.toggle: sleep_modus + + ##### Hotwater Charge ##### + - platform: nextion + name: ${device_name} Hotwater Charge + page_id: 6 + component_id: 21 + on_click: + - homeassistant.service: + service: switch.toggle + data: + entity_id: ${ha_hotwater_charge} + + ######################################### + # + # + ############################################################# + ##### CLOSE - BINARY SENSOR ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - SENSOR ##### + ############################################################# + # + # + ######################################### + + sensor: + + ##### Uptime ##### + - platform: uptime + name: ${device_name} uptime + disabled_by_default: true + + ##### WIFI Signal stregth + - platform: wifi_signal + name: ${device_name} RSSI + update_interval: 60s + + ##### INTERNAL TEMPERATUE SENSOR, ADC VALUE ##### + - platform: adc + id: ntc_source + pin: 38 + update_interval: 10s + attenuation: 11db + + ##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)##### + - platform: resistance + id: resistance_sensor + sensor: ntc_source + configuration: DOWNSTREAM + resistor: 11.2kOhm + + ##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) ##### + - platform: ntc + name: ${device_name} Temperature + id: temp_nspanel + sensor: resistance_sensor + calibration: + b_constant: 3950 + reference_temperature: 25°C + reference_resistance: 10kOhm + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: id(disp1).set_component_text_printf("home.a03", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page. + - lambda: id(disp1).set_component_text_printf("thermostat.a04", "%.1f", id(temp_nspanel).state); + + ##### THERMOSTAT CLIMATE TARGET TEMPERATURE FROM HA ##### + - platform: homeassistant + id: ha_climate_target_temp + entity_id: ${ha_climate_thermostat_target_temp} + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - globals.set: + id: climate_target_temp_val_global + value: !lambda 'return float(x);' + - lambda: id(disp1).set_component_text_printf("thermostat.a05", "%.1f", id(climate_target_temp_val_global)); + # THERMO PROGRESS CIRCLE, broken into 3 images to create space for the temperatures in the center. + - lambda: |- + int left=16; // 16 is empty left. + int mid=17; // 17 is empty mid. + int right=18; // 18 is empty right. + if (id(climate_target_temp_val_global) == 13) { + left=16; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 13.5) { + left=19; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 14) { + left=20; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 14.5) { + left=21; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 15) { + left=22; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 15.5) { + left=23; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 16) { + left=24; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 16.5) { + left=25; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 17) { + left=26; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 17.5) { + left=27; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 18) { + left=28; + mid=17; + right=18; + } else if (id(climate_target_temp_val_global) == 18.5) { + left=29; + mid=30; + right=18; + } else if (id(climate_target_temp_val_global) == 19) { + left=29; + mid=31; + right=18; + } else if (id(climate_target_temp_val_global) == 19.5) { + left=29; + mid=32; + right=18; + } else if (id(climate_target_temp_val_global) == 20) { + left=29; + mid=33; + right=18; + } else if (id(climate_target_temp_val_global) == 20.5) { + left=29; + mid=34; + right=18; + } else if (id(climate_target_temp_val_global) == 21) { + left=29; + mid=35; + right=18; + } else if (id(climate_target_temp_val_global) == 21.5) { + left=29; + mid=36; + right=18; + } else if (id(climate_target_temp_val_global) == 22) { + left=29; + mid=37; + right=38; + } else if (id(climate_target_temp_val_global) == 22.5) { + left=29; + mid=37; + right=39; + } else if (id(climate_target_temp_val_global) == 23) { + left=29; + mid=37; + right=40; + } else if (id(climate_target_temp_val_global) == 23.5) { + left=29; + mid=37; + right=41; + } else if (id(climate_target_temp_val_global) == 24) { + left=29; + mid=37; + right=42; + } else if (id(climate_target_temp_val_global) == 24.5) { + left=29; + mid=37; + right=43; + } else if (id(climate_target_temp_val_global) == 25) { + left=29; + mid=37; + right=44; + } else if (id(climate_target_temp_val_global) == 25.5) { + left=29; + mid=37; + right=45; + } else if (id(climate_target_temp_val_global) == 26) { + left=29; + mid=37; + right=46; + } else if (id(climate_target_temp_val_global) == 26.5) { + left=29; + mid=37; + right=47; + } else if (id(climate_target_temp_val_global) == 27) { + left=29; + mid=37; + right=48; + } + // sends the 3 images to the display + id(disp1).send_command_printf("thermostat.a01.pic=%i", left); + id(disp1).send_command_printf("thermostat.a02.pic=%i", mid); + id(disp1).send_command_printf("thermostat.a03.pic=%i", right); + + ###### TARGET TEMPERATURE GET VALUE FROM NEXTION CIRCLE SLIDER AND SET GLOBAL VARIBLE ##### + - platform: nextion + id: climate_circleslider + name: ${device_name} Climate circleslider + variable_name: climateslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - globals.set: + id: climate_slider_val_global + value: !lambda 'return int(x);' + - lambda: |- + if (id(climate_slider_val_global) == 0) { + id(climate_target_temp_val_global) = 13; + } else if (id(climate_slider_val_global) == 1) { + id(climate_target_temp_val_global) = 13.5; + } else if (id(climate_slider_val_global) == 2) { + id(climate_target_temp_val_global) = 14; + } else if (id(climate_slider_val_global) == 3) { + id(climate_target_temp_val_global) = 14.5; + } else if (id(climate_slider_val_global) == 4) { + id(climate_target_temp_val_global) = 15; + } else if (id(climate_slider_val_global) == 5) { + id(climate_target_temp_val_global) = 15.5; + } else if (id(climate_slider_val_global) == 6) { + id(climate_target_temp_val_global) = 16; + } else if (id(climate_slider_val_global) == 7) { + id(climate_target_temp_val_global) = 16.5; + } else if (id(climate_slider_val_global) == 8) { + id(climate_target_temp_val_global) = 17; + } else if (id(climate_slider_val_global) == 9) { + id(climate_target_temp_val_global) = 17.5; + } else if (id(climate_slider_val_global) == 10) { + id(climate_target_temp_val_global) = 18; + } else if (id(climate_slider_val_global) == 11) { + id(climate_target_temp_val_global) = 18.5; + } else if (id(climate_slider_val_global) == 12) { + id(climate_target_temp_val_global) = 19; + } else if (id(climate_slider_val_global) == 13) { + id(climate_target_temp_val_global) = 19.5; + } else if (id(climate_slider_val_global) == 14) { + id(climate_target_temp_val_global) = 20; + } else if (id(climate_slider_val_global) == 15) { + id(climate_target_temp_val_global) = 20.5; + } else if (id(climate_slider_val_global) == 16) { + id(climate_target_temp_val_global) = 21; + } else if (id(climate_slider_val_global) == 17) { + id(climate_target_temp_val_global) = 21.5; + } else if (id(climate_slider_val_global) == 18) { + id(climate_target_temp_val_global) = 22; + } else if (id(climate_slider_val_global) == 19) { + id(climate_target_temp_val_global) = 22.5; + } else if (id(climate_slider_val_global) == 20) { + id(climate_target_temp_val_global) = 23; + } else if (id(climate_slider_val_global) == 21) { + id(climate_target_temp_val_global) = 23.5; + } else if (id(climate_slider_val_global) == 22) { + id(climate_target_temp_val_global) = 24; + } else if (id(climate_slider_val_global) == 23) { + id(climate_target_temp_val_global) = 24.5; + } else if (id(climate_slider_val_global) == 24) { + id(climate_target_temp_val_global) = 25; + } else if (id(climate_slider_val_global) == 25) { + id(climate_target_temp_val_global) = 25.5; + } else if (id(climate_slider_val_global) == 26) { + id(climate_target_temp_val_global) = 26; + } else if (id(climate_slider_val_global) == 27) { + id(climate_target_temp_val_global) = 26.5; + } else if (id(climate_slider_val_global) == 28) { + id(climate_target_temp_val_global) = 27; + } + - homeassistant.service: + service: climate.set_temperature + data_template: + entity_id: ${ha_climate_thermostat} + temperature: !lambda return id(climate_target_temp_val_global); + + ###### Display Brightness GET VALUE FROM NSPanel SLIDER ##### + - platform: nextion + id: brightslider + name: ${device_name} brightness Slider + variable_name: brightslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - number.set: + id: display_brightness + value: !lambda 'return int(x);' + # send text field percentage of current_lightslider_val + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + + ###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER ##### + - platform: nextion + id: dimslider + name: ${device_name} dim brightness slider + variable_name: dimslider + internal: true + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - number.set: + id: display_dim_brightness + value: !lambda 'return int(x);' + # send text field percentage of current_lightslider_val + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + + ###### Send current page to HA + - platform: nextion + id: current_page + name: "${device_name} Current Page" + variable_name: dp + update_interval: 1s + accuracy_decimals: 0 + filters: + - delta: 1.0 + - lambda: return int(x); + + + ######################################### + # + # + ############################################################# + ##### CLOSE - SENSOR ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - TEXT SENSOR##### + ############################################################# + # + # + ######################################### + + text_sensor: + + ##### ESPhome version used to compile the app ##### + - platform: version + name: ${device_name} ESPhome Version + disabled_by_default: true + + - platform: wifi_info + ip_address: + name: ${device_name} IP + disabled_by_default: true + ssid: + name: ${device_name} SSID + disabled_by_default: true + bssid: + name: ${device_name} BSSID + disabled_by_default: true + + ##### SUN SENSOR FROM HA ##### + - platform: homeassistant + id: sun_sun + entity_id: sun.sun + + ##### last click sensor, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: ${device_name} Last Click + id: disp1_last_click_nextion + update_interval: 50ms + component_name: lastclick + internal: false + filters: - lambda: |- - int symbol=60; // 60 is a blank image 30x30 - if (id(heating_system).state == "on") { - symbol=61; - } - id(disp1).send_command_printf("home.a50.pic=%i", symbol); - id(disp1).send_command_printf("thermostat.a50.pic=%i", symbol); - -##### Hotwater Charge ICON ##### - - platform: homeassistant - entity_id: $ha_hotwater_charge - name: "Hotwater Charge" - id: hotwater_charge - on_value: - then: - - wait_until: - switch.is_on: nextion_init - - lambda: |- - if (id(hotwater_charge).state == "on") { - id(disp1).set_component_value("thermostat.a12",1); + if (strcmp(x.c_str(), id(lastclick_global).c_str()) != 0) { + return x; } else { - id(disp1).set_component_value("thermostat.a12",0); + return {}; } -# - lambda: |- -# id(disp1).set_component_value("thermostat.a12",0); -# if (id(hotwater_charge) == "on") -# { -# id(disp1).set_component_value("thermostat.a12",1); -# } - -##### WEATHER SYMBOL FROM HA WEATHER ENTITY ##### - - platform: homeassistant - id: weather_symbol - entity_id: weather.home_wetter - on_value: - then: - - wait_until: - switch.is_on: nextion_init + on_value: + then: + - globals.set: + id: lastclick_global + value: !lambda return x; + + ##### last click lightsettings page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: ${device_name} last click lightsettings + id: disp1_last_click_lightsettings + update_interval: 50ms + component_name: lightsetting + internal: false + filters: - lambda: |- - int symbol=1; // 1 is a empty box. - if (id(weather_symbol).state == "sunny") { - symbol=2; - } else if (id(weather_symbol).state == "cloudy") { - symbol=3; - if (id(sun_sun).state == "below_horizon") { - symbol=3; + if (strcmp(x.c_str(), id(last_click_lightsettings).c_str()) != 0) { + return x; + } else { + return {}; + } + on_value: + then: + - globals.set: + id: last_click_lightsettings + value: !lambda return x; + + ##### last click coversettings page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: ${device_name} last click coversettings + id: disp1_last_click_coversettings + update_interval: 50ms + component_name: coversetting + internal: false + filters: + - lambda: |- + if (strcmp(x.c_str(), id(last_click_coversettings).c_str()) != 0) { + return x; + } else { + return {}; + } + on_value: + then: + - globals.set: + id: last_click_coversettings + value: !lambda return x; + + ##### last click weather page, the main action variable - push to HA ##### + - platform: nextion + nextion_id: disp1 + name: ${device_name} last click weathersettings + id: disp1_last_click_weathersettings + update_interval: 50ms + component_name: weathersetting + internal: false + filters: + - lambda: |- + if (strcmp(x.c_str(), id(last_click_weathersettings).c_str()) != 0) { + return x; + } else { + return {}; + } + on_value: + then: + - globals.set: + id: last_click_weathersettings + value: !lambda return x; + + ##### HEATING System ICON ##### + - platform: homeassistant + entity_id: ${ha_heating_system_flame} + name: "Heating System" + id: heating_system + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + int symbol=53; // 53 is a blank image 20x20 + if (id(heating_system).state == "on") { + symbol=64; } - } else if (id(weather_symbol).state == "rainy") { - symbol=4; - } else if (id(weather_symbol).state == "pouring") { - symbol=5; - } else if (id(weather_symbol).state == "snowy") { - symbol=6; - } else if (id(weather_symbol).state == "hail" || id(weather_symbol).state == "snowy-rainy") { - symbol=7; - } else if (id(weather_symbol).state == "fog") { - symbol=8; - } else if (id(weather_symbol).state == "windy" || id(weather_symbol).state == "windy-variant") { - symbol=9; - } else if (id(weather_symbol).state == "lightning") { - symbol=10; - } else if (id(weather_symbol).state == "partlycloudy") { - symbol=11; - if (id(sun_sun).state == "below_horizon") { - symbol=12; + id(disp1).send_command_printf("home.a50.pic=%i", symbol); + id(disp1).send_command_printf("thermostat.a50.pic=%i", symbol); + + ##### Hotwater Charge ICON ##### + - platform: homeassistant + entity_id: ${ha_hotwater_charge} + name: "Hotwater Charge" + id: hotwater_charge + on_value: + then: + - wait_until: + switch.is_on: nextion_init + - lambda: |- + if (id(hotwater_charge).state == "on") { + id(disp1).set_component_value("thermostat.a12",1); + } else { + id(disp1).set_component_value("thermostat.a12",0); } - } else if (id(weather_symbol).state == "lightning-rainy" || id(weather_symbol).state == "exceptional") { - symbol=13; - if (id(sun_sun).state == "below_horizon") { - symbol=14; - } - } else if (id(weather_symbol).state == "clear-night") { - symbol=15; - } - id(disp1).send_command_printf("home.a05.pic=%i", symbol); - -######################################### -# -# -############################################################# -##### CLOSE - TEXT SENSOR ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - SWITCH ##### -############################################################# -# -# -######################################### - -switch: - -##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display ##### - - platform: template - name: $device_name Nextion inited - id: nextion_init - entity_category: config - restore_state: false - assumed_state: off - optimistic: true - -##### UPDATE TFT DISPLAY ##### - - platform: template - name: Update TFT display - id: tft_update - turn_on_action: - - delay: 16ms - - lambda: id(disp1).upload_tft(); - - switch.turn_off: tft_update - -##### PHYSICAL SWITCH 1 ##### - - platform: gpio - name: $device_name Relay 1 - id: relay_1 - pin: - number: 22 - -##### PHYSICAL SWITCH 2 ###### - - platform: gpio - name: $device_name Relay 2 - id: relay_2 - pin: - number: 19 - on_turn_off: - - globals.set: - id: heating_room_global - value: '0' - - lambda: |- - if (id(hvac_mode_global) == 0) - { - id(disp1).send_command_printf("thermostat.a06.pic=51"); - } else if (id(hvac_mode_global) == 1) { - id(disp1).send_command_printf("thermostat.a06.pic=52"); - } - - lambda: id(disp1).send_command_printf("home.a52.pic=60"); - - lambda: id(disp1).send_command_printf("thermostat.a52.pic=60"); - on_turn_on: - - globals.set: - id: heating_room_global - value: '1' - - lambda: id(disp1).send_command_printf("thermostat.a06.pic=53"); - - lambda: id(disp1).send_command_printf("home.a52.pic=63"); - - lambda: id(disp1).send_command_printf("thermostat.a52.pic=63"); - -##### Switch Climate HVAC Mode ##### - - platform: template - device_class: switch - name: $device_name hvac Mode - id: hvac_mode - restore_state: true - assumed_state: false - optimistic: true - on_turn_off: - - lambda: id(disp1).set_component_value("thermostat.a10",0); - - globals.set: - id: hvac_mode_global - value: '0' - - homeassistant.service: - service: climate.set_hvac_mode - data_template: - entity_id: $ha_climate_thermostat - hvac_mode: 'off' - - lambda: id(disp1).send_command_printf("thermostat.a06.pic=51"); - - lambda: id(disp1).send_command_printf("home.a51.pic=60"); - - lambda: id(disp1).send_command_printf("thermostat.a51.pic=60"); - on_turn_on: - - lambda: id(disp1).set_component_value("thermostat.a10",1); - - globals.set: - id: hvac_mode_global - value: '1' - - homeassistant.service: - service: climate.set_hvac_mode - data_template: - entity_id: $ha_climate_thermostat - hvac_mode: 'heat' - - lambda: |- - if (id(heating_room_global) == 0) - { - id(disp1).send_command_printf("thermostat.a06.pic=52"); - } else if (id(heating_room_global) == 1) { - id(disp1).send_command_printf("thermostat.a06.pic=53"); - } - - lambda: id(disp1).send_command_printf("home.a51.pic=62"); - - lambda: id(disp1).send_command_printf("thermostat.a51.pic=62"); - -##### DISPLAY ALWAYS ON ##### - - platform: gpio - name: $device_name Screen Power - id: screen_power - entity_category: config - pin: - number: 4 - inverted: true - restore_mode: ALWAYS_ON - internal: true - -##### Switch Display Sleep Modus ##### - - platform: template - device_class: switch - name: $device_name Sleep Modus - id: sleep_modus - restore_state: true - assumed_state: false - optimistic: true - on_turn_off: - - lambda: id(disp1).send_command_printf("home.sleepmodus.val=0"); - - globals.set: - id: sleep_modus_global - value: '0' - - lambda: id(disp1).set_component_value("settings.a02",0); - on_turn_on: - - lambda: id(disp1).send_command_printf("home.sleepmodus.val=1"); - - globals.set: - id: sleep_modus_global - value: '1' - - lambda: id(disp1).set_component_value("settings.a02",1); - -######################################### -# -# -############################################################# -##### CLOSE - SWITCH ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - NUMBER ##### -############################################################# -# -# -######################################### - -number: - -##### SCREEN BRIGHTNESS ##### - - platform: template - name: $device_name Display Brightness - id: display_brightness - entity_category: config - unit_of_measurement: '%' - min_value: 1 - max_value: 100 - step: 1 - restore_value: true - optimistic: true - set_action: - then: - - lambda: 'id(disp1).set_backlight_brightness(x/100);' - - lambda: 'id(disp1).send_command_printf("home.brightness.val=%i", int(x));' + + ######################################### + # + # + ############################################################# + ##### CLOSE - TEXT SENSOR ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - SWITCH ##### + ############################################################# + # + # + ######################################### + + switch: + + # ##### Restart switch ###### + # - platform: restart + # name: ${device_name} Restart + + # ##### Restart in safe-mode ##### + # - platform: safe_mode + # name: ${device_name} Restart (Safe Mode) + + ##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display ##### + - platform: template + name: ${device_name} Nextion inited + id: nextion_init + entity_category: config + restore_state: false + assumed_state: off + optimistic: true + + ##### UPDATE TFT DISPLAY ##### + - platform: template + name: Update TFT display + id: tft_update + turn_on_action: + - delay: 16ms + - lambda: id(disp1).upload_tft(); + - switch.turn_off: tft_update + + ##### PHYSICAL SWITCH 1 ##### + - platform: gpio + name: ${device_name} Relay 1 + id: relay_1 + pin: + number: 22 + + ##### PHYSICAL SWITCH 2 ###### + - platform: gpio + name: ${device_name} Relay 2 + id: relay_2 + pin: + number: 19 + + ##### Switch Climate HVAC Mode ##### + - platform: template + device_class: switch + name: ${device_name} hvac Mode + id: hvac_mode + restore_state: true + assumed_state: false + optimistic: true + on_turn_off: + - lambda: id(disp1).set_component_value("thermostat.a10",0); - globals.set: - id: display_brightness_global - value: !lambda 'return int(x);' - -##### SCREEN BRIGHTNESS DIMMED DOWN ##### - - platform: template - name: $device_name Display Brightness Dimdown - id: display_dim_brightness - entity_category: config - unit_of_measurement: '%' - min_value: 1 - max_value: 100 - step: 1 - restore_value: true - optimistic: true - set_action: - then: - - lambda: 'id(disp1).send_command_printf("home.brightdd.val=%i", int(x));' + id: hvac_mode_global + value: '0' + - homeassistant.service: + service: climate.set_hvac_mode + data_template: + entity_id: $ha_climate_thermostat + hvac_mode: 'off' + - lambda: id(disp1).send_command_printf("thermostat.a06.pic=49"); + - lambda: id(disp1).send_command_printf("home.a51.pic=53"); + - lambda: id(disp1).send_command_printf("thermostat.a51.pic=53"); + on_turn_on: + - lambda: id(disp1).set_component_value("thermostat.a10",1); - globals.set: - id: display_dim_brightness_global - value: !lambda 'return int(x);' - -######################################### -# -# -############################################################# -##### CLOSE - NUMBER ##### -############################################################# -# -## -### -############################################################################################################################################################################################# -### -## -# -############################################################# -##### START - DISPLAY START##### -############################################################# -# -# -######################################### - -display: - - platform: nextion - id: disp1 - uart_id: tf_uart - tft_url: $nextion_update_url - on_setup: - then: - - lambda: id(disp1).send_command_printf("page 9"); ##### CHANGE! - Loading page ##### - - wait_until: - api.connected - - delay: 0.5s - - rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6" - - delay: 0.5s - - switch.template.publish: - id: nextion_init - state: on - - lambda: id(disp1).send_command_printf("page 0"); #### home page ##### - - delay: 2s ##### gives the display time to update other components & set the home page ##### - - number.set: - id: display_brightness - value: !lambda 'return id(display_brightness_global);' - - number.set: - id: display_dim_brightness - value: !lambda 'return id(display_dim_brightness_global);' - - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); - - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); - - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); - - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); - - lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global)); + id: hvac_mode_global + value: '1' + - homeassistant.service: + service: climate.set_hvac_mode + data_template: + entity_id: $ha_climate_thermostat + hvac_mode: 'heat' - lambda: |- - id(disp1).set_component_value("settings.a02",0); - if (id(sleep_modus_global) == 1) + if (id(heating_room_global) == 0) { - id(disp1).set_component_value("settings.a02",1); - } - - lambda: |- - id(disp1).send_command_printf("home.a50.pic=60"); - id(disp1).send_command_printf("thermostat.a50.pic=60"); - id(disp1).send_command_printf("thermostat.a06.pic=52"); - if (id(heating_room_global) == 1) - { - id(disp1).send_command_printf("home.a52.pic=63"); - id(disp1).send_command_printf("thermostat.a52.pic=63"); - id(disp1).send_command_printf("thermostat.a06.pic=53"); - } - - lambda: |- - if (id(hvac_mode_global) == 0) { - id(disp1).send_command_printf("home.a51.pic=60"); - id(disp1).send_command_printf("thermostat.a51.pic=60"); + id(disp1).send_command_printf("thermostat.a06.pic=50"); + } else if (id(heating_room_global) == 1) { id(disp1).send_command_printf("thermostat.a06.pic=51"); - } else if (id(hvac_mode_global) == 1) { - id(disp1).send_command_printf("home.a51.pic=62"); - id(disp1).send_command_printf("thermostat.a51.pic=62"); - id(disp1).set_component_value("thermostat.a10",1); - } - -############################################################# -##### CLOSE - DISPLAY START ##### -############################################################# + } + - lambda: id(disp1).send_command_printf("home.a51.pic=65"); + - lambda: id(disp1).send_command_printf("thermostat.a51.pic=65"); + + ##### DISPLAY ALWAYS ON ##### + - platform: gpio + name: ${device_name} Screen Power + id: screen_power + entity_category: config + pin: + number: 4 + inverted: true + restore_mode: ALWAYS_ON + internal: true + + ##### Switch Display Sleep Modus ##### + - platform: template + device_class: switch + name: ${device_name} Sleep Modus + id: sleep_modus + restore_state: true + assumed_state: false + optimistic: true + on_turn_off: + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=0"); + - globals.set: + id: sleep_modus_global + value: '0' + - lambda: id(disp1).set_component_value("settings.a02",0); + on_turn_on: + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=1"); + - globals.set: + id: sleep_modus_global + value: '1' + - lambda: id(disp1).set_component_value("settings.a02",1); + + ######################################### + # + # + ############################################################# + ##### CLOSE - SWITCH ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - NUMBER ##### + ############################################################# + # + # + ######################################### + + number: + + ##### SCREEN BRIGHTNESS ##### + - platform: template + name: ${device_name} Display Brightness + id: display_brightness + entity_category: config + unit_of_measurement: '%' + min_value: 1 + max_value: 100 + step: 1 + restore_value: true + optimistic: true + set_action: + then: + - lambda: 'id(disp1).set_backlight_brightness(x/100);' + - lambda: 'id(disp1).send_command_printf("home.brightness.val=%i", int(x));' + - globals.set: + id: display_brightness_global + value: !lambda 'return int(x);' + + ##### SCREEN BRIGHTNESS DIMMED DOWN ##### + - platform: template + name: ${device_name} Display Brightness Dimdown + id: display_dim_brightness + entity_category: config + unit_of_measurement: '%' + min_value: 1 + max_value: 100 + step: 1 + restore_value: true + optimistic: true + set_action: + then: + - lambda: 'id(disp1).send_command_printf("home.brightdd.val=%i", int(x));' + - globals.set: + id: display_dim_brightness_global + value: !lambda 'return int(x);' + + ######################################### + # + # + ############################################################# + ##### CLOSE - NUMBER ##### + ############################################################# + # + ## + ### + ############################################################################################################################################################################################# + ### + ## + # + ############################################################# + ##### START - DISPLAY START##### + ############################################################# + # + # + ######################################### + + display: + - platform: nextion + id: disp1 + uart_id: tf_uart + tft_url: ${nextion_update_url} + on_setup: + then: + - lambda: id(disp1).send_command_printf("page 9"); ##### CHANGE! - Loading page ##### + - wait_until: + api.connected + - delay: 0.5s + - rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6" + - delay: 0.5s + - switch.template.publish: + id: nextion_init + state: on + - lambda: id(disp1).send_command_printf("page 0"); #### home page ##### + - delay: 2s ##### gives the display time to update other components & set the home page ##### + - number.set: + id: display_brightness + value: !lambda 'return id(display_brightness_global);' + - number.set: + id: display_dim_brightness + value: !lambda 'return id(display_dim_brightness_global);' + - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global)); + - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global)); + - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global)); + - lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global)); + - lambda: |- + id(disp1).set_component_value("settings.a02",0); + if (id(sleep_modus_global) == 1) + { + id(disp1).set_component_value("settings.a02",1); + } + - lambda: |- + id(disp1).send_command_printf("home.a50.pic=53"); + id(disp1).send_command_printf("thermostat.a50.pic=53"); + id(disp1).send_command_printf("thermostat.a06.pic=50"); + if (id(heating_room_global) == 1) + { + id(disp1).send_command_printf("home.a52.pic=66"); + id(disp1).send_command_printf("thermostat.a52.pic=66"); + id(disp1).send_command_printf("thermostat.a06.pic=51"); + } + - lambda: |- + if (id(hvac_mode_global) == 0) { + id(disp1).send_command_printf("home.a51.pic=53"); + id(disp1).send_command_printf("thermostat.a51.pic=53"); + id(disp1).send_command_printf("thermostat.a06.pic=49"); + } else if (id(hvac_mode_global) == 1) { + id(disp1).send_command_printf("home.a51.pic=65"); + id(disp1).send_command_printf("thermostat.a51.pic=65"); + id(disp1).set_component_value("thermostat.a10",1); + } + + ############################################################# + ##### CLOSE - DISPLAY START ##### + ############################################################# \ No newline at end of file diff --git a/nspanel.HMI b/nspanel.HMI new file mode 100644 index 0000000..21f9598 Binary files /dev/null and b/nspanel.HMI differ diff --git a/nspanel.tft b/nspanel.tft new file mode 100644 index 0000000..609abe0 Binary files /dev/null and b/nspanel.tft differ