From 84c9f073bd03d7e3e0b86406d5d1b11a6174f348 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 6 Apr 2023 00:13:08 +0200 Subject: [PATCH] Added `continue_on_error` to service calls (#608) This will make the automation more resilient, however it could hide some errors, making a bit harder to troubleshoot. --- nspanel_blueprint.yaml | 164 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 41bffaf..89cef98 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -3692,6 +3692,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages[entity_long_domain] }}" + continue_on_error: true ##### BOOT NSPANEL - boot init ##### - alias: Boot init @@ -3707,18 +3708,22 @@ action: data: component: boot.bluep_version message: "{{ blueprint_version }}" + continue_on_error: true ###### Set local fallback ###### - service: "switch.turn_{{ 'on' if relay_1_local_fallback else 'off' }}" data: entity_id: 'switch.{{ nspanel_name }}_relay_1_local_fallback' + continue_on_error: true - service: "switch.turn_{{ 'on' if relay_2_local_fallback else 'off' }}" data: entity_id: 'switch.{{ nspanel_name }}_relay_2_local_fallback' + continue_on_error: true ##### clear notification icon ##### - service: "{{ nextion.commands.notification_clear }}" data: {} + continue_on_error: true ###### NSPanel beep ###### - delay: @@ -3728,6 +3733,7 @@ action: - service: "{{ nextion.commands.play_rtttl }}" data: song_str: "two short:d=4,o=5,b=100:16e6,16e6" + continue_on_error: true ##### NSPanel boot init finished and jump to Home Page##### - &delay-default @@ -3736,6 +3742,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: page home + continue_on_error: true ##### PAGE CHANGED - changes when page changed ##### - alias: Page changed @@ -3755,6 +3762,7 @@ action: entity_id: "{{ entity_long }}" #hvac_mode: 'heat' temperature: "{{ display_target_temperature_state }}" + continue_on_error: true - choose: ## PAGE HOME ## - alias: Home page @@ -3785,6 +3793,7 @@ action: - service: "{{ nextion.commands.set_settings_entity }}" data: entity: 'unknown' + continue_on_error: true ##### NSPanel Date ##### ### DATE Font Color ### - &variables-date_format @@ -3795,12 +3804,14 @@ action: data: component: home.date message: "{{ page_home.general.date.label.color_rgb if is_number(page_home.general.date.label.color_rgb) else ((page_home.general.date.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.date.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.date.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### DATE Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.date message: "{{ (dict.values(mui[language].weekdays) | list)[now().weekday()] ~ ', ' ~ as_timestamp(now()) | timestamp_custom(date_format) }}" + continue_on_error: true ##### NSPanel Time ##### ### TIME Font Color ### - *delay-default @@ -3808,24 +3819,28 @@ action: data: component: home.time message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### TIME Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.time message: "{{ time }}" + continue_on_error: true ### TIME Meridiem Font Color ### - *delay-default - service: "{{ nextion.commands.font_color }}" data: component: home.meridiem message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### TIME Meridiem Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.meridiem message: "{{ meridiem }}" + continue_on_error: true ##### NSPanel Outdoor Temp ##### - variables: @@ -3837,12 +3852,14 @@ action: data: component: home.outdoor_temp message: "{{ page_home.general.outdoor_temp.label.color_rgb if is_number(page_home.general.outdoor_temp.label.color_rgb) else ((page_home.general.outdoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.outdoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.outdoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Outdoor Temp Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.outdoor_temp message: "{{ (outdoor_temp | round(1) ~ weather_units.temperature) if is_number(outdoor_temp) else (mui[language].unavailable if outdoor_temp in ['unavailable', 'unknown', None] else outdoor_temp) }}" + continue_on_error: true ##### NSPanel Indoor Temp ##### - variables: @@ -3853,30 +3870,35 @@ action: data: component: home.indoortempicon message: "{{ page_home.general.indoor_temp.icon.color_rgb if is_number(page_home.general.indoor_temp.icon.color_rgb) else ((page_home.general.indoor_temp.icon.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.icon.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.icon.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### ICON Indoor Temp Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.indoortempicon message: "{{ page_home.general.indoor_temp.icon.icon }}" + continue_on_error: true ### LABEL Indoor Temp Font Color ### - *delay-default - service: "{{ nextion.commands.font_color }}" data: component: home.current_temp message: "{{ page_home.general.indoor_temp.label.color_rgb if is_number(page_home.general.indoor_temp.label.color_rgb) else ((page_home.general.indoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Indoor Temp Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.current_temp message: "{{ (indoor_temp_state | round(1) ~ weather_units.temperature) if is_number(indoor_temp_state) else (mui[language].unavailable if indoor_temp_state in ['unavailable', 'unknown', None] else indoor_temp_state) }}" + continue_on_error: true ##### Weather Icon Home Page ##### - *delay-default - service: "{{ nextion.commands.printf }}" data: cmd: home.weather.pic={{ nextion.pics.weather[states(weather_entity) | default('unavailable') if weather_entity is string else 'unavailable'] | default(None) }} + continue_on_error: true ##### NSPanel Buttons ##### - variables: @@ -3892,12 +3914,14 @@ action: data: component: home.left_bt_text message: "{{ page_home.hardware.buttons.left.color_rgb if is_number(page_home.hardware.buttons.left.color_rgb) else ((page_home.hardware.buttons.left.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.left.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.left.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.left_bt_text message: "{{ page_home.hardware.buttons.left.name }}" + continue_on_error: true ##### SET Left Hardware Button PIC on Home Page #### - if: "{{ left_button_state not in ['unavailable', 'unknown', None] }}" @@ -3909,6 +3933,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: home.left_bt_pic.pic={{ left_hardware_button_state }} + continue_on_error: true ##### NSPanel Right Button Name ##### - if: "{{ page_home.hardware.buttons.right.name | length > 0 }}" @@ -3919,12 +3944,14 @@ action: data: component: home.right_bt_text message: "{{ page_home.hardware.buttons.right.color_rgb if is_number(page_home.hardware.buttons.right.color_rgb) else ((page_home.hardware.buttons.right.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.right.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.right.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.right_bt_text message: "{{ page_home.hardware.buttons.right.name }}" + continue_on_error: true ##### SET Right Hardware Button PIC on Home Page ##### - if: "{{ right_button_state not in ['unavailable', 'unknown', None] }}" @@ -3936,6 +3963,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: home.right_bt_pic.pic={{ right_hardware_button_state }} + continue_on_error: true ###### Status bar ###### - &variables-home_page_status_bar @@ -3987,12 +4015,14 @@ action: data: component: "{{ 'home.icon_top_%02d' | format(repeat.index) }}" message: "{{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }}" + continue_on_error: true ### ICON Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: "{{ 'home.icon_top_%02d' | format(repeat.index) }}" message: "{{ repeat.item.icon if is_state(repeat.item.entity, 'on') | default(False) else nextion.icons.blank }}" + continue_on_error: true # {{ is_state(repeat.item.entity, 'on') | default(False) if repeat.item.entity is string else 'unavailable' }} ##### HOME VALUE 01 - 03 @@ -4026,24 +4056,28 @@ action: data: component: "{{ 'home.value%02d_icon' | format(repeat.index) }}" message: "{{ repeat.item.icon_color_rgb if is_number(repeat.item.icon_color_rgb) else ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3)) }}" + continue_on_error: true ### ICON Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: "{{ 'home.value%02d_icon' | format(repeat.index) }}" message: "{{ repeat.item.icon }}" + continue_on_error: true ### LABEL Font Color ### - *delay-default - service: "{{ nextion.commands.font_color }}" data: component: "{{ 'home.value%02d_state' | format(repeat.index) }}" message: "{{ repeat.item.label_color_rgb if is_number(repeat.item.label_color_rgb) else ((repeat.item.label_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.label_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.label_color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: "{{ 'home.value%02d_state' | format(repeat.index) }}" message: "{{ (states(repeat.item.entity) | round(1) ~ (state_attr(repeat.item.entity, 'unit_of_measurement') if state_attr(repeat.item.entity, 'unit_of_measurement') else '')) if is_number(states(repeat.item.entity)) else states(repeat.item.entity) | default('unknown') }}" + continue_on_error: true ##### Set notify icon ##### - variables: @@ -4057,6 +4091,7 @@ action: data: component: home.button04_icon message: "{{ set_button04_icon }}" + continue_on_error: true ##### SET ICON Font Color - Notify ##### - *delay-default @@ -4064,6 +4099,7 @@ action: data: component: home.button04_icon message: "{{ set_button04_icon_font }}" + continue_on_error: true ###### QR Code - Icon ###### - *delay-default @@ -4074,17 +4110,20 @@ action: data: component: home.button05_icon message: "{{ page_home.buttons[4].color_rgb.on if is_number(page_home.buttons[4].color_rgb.on) else ((page_home.buttons[4].color_rgb.on[0] //(2**3)) *(2**11))+((page_home.buttons[4].color_rgb.on[1] //(2**2)) *(2**5))+(page_home.buttons[4].color_rgb.on[2] //(2**3)) }}" + continue_on_error: true ### ICON Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.button05_icon message: "{{ page_home.buttons[4].icon }}" + continue_on_error: true else: # Display blank icon - service: "{{ nextion.commands.text_printf }}" data: component: home.button05_icon message: "{{ nextion.icons.blank }}" + continue_on_error: true ###### ENTITIES - Icon ###### - *delay-default @@ -4095,21 +4134,25 @@ action: data: component: home.button06_icon message: "{{ page_home.buttons[5].color_rgb.on if is_number(page_home.buttons[5].color_rgb.on) else ((page_home.buttons[5].color_rgb.on[0] //(2**3)) *(2**11))+((page_home.buttons[5].color_rgb.on[1] //(2**2)) *(2**5))+(page_home.buttons[5].color_rgb.on[2] //(2**3)) }}" + continue_on_error: true ### ICON Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.button06_icon message: "{{ page_home.buttons[5].icon }}" + continue_on_error: true else: # Display blank icon - service: "{{ nextion.commands.text_printf }}" data: component: home.button06_icon message: "{{ nextion.icons.blank }}" + continue_on_error: true ###### SHOW All component when page loading done ##### - *delay-default - service: "{{ nextion.commands.show_all }}" + continue_on_error: true ## BUTTON PAGES 01 - 04 ## - alias: Button pages @@ -4325,6 +4368,7 @@ action: - service: "{{ nextion.commands.set_settings_entity }}" data: entity: 'unknown' + continue_on_error: true ##### Button Page Label ##### - if: "{{ button_pages_labels[button_page_index].label | length > 0 }}" then: @@ -4332,6 +4376,7 @@ action: data: component: "{{ 'bpage%02d_label' | format(button_page_index+1) }}" message: "{{ button_pages_labels[button_page_index].label }}" + continue_on_error: true - *variables-weather ##### NSPanel build Button page ##### @@ -4389,9 +4434,11 @@ action: btn_icon: "{{ btn_icon }}" btn_label: "{{ btn_label }}" btn_bri_txt: "{{ btn_bri_txt }}" + continue_on_error: true ###### SHOW All component when page loading done ##### - *delay-default - service: "{{ nextion.commands.show_all }}" + continue_on_error: true ## PAGE LIGHTSETTINGS ## - alias: Light settings page @@ -4401,6 +4448,7 @@ action: data: component: lightsettings.light_name message: "{{ entity_long_name }}" + continue_on_error: true ##### LIGHT ICON - ON / OFF ##### - variables: lightsettings_icon_font: "{{ entity_long_icon if entity_long_icon not in ['unavailable', 'unknown', None] and entity_long_icon | length > 0 else nextion.icons.buttons.light }}" @@ -4410,11 +4458,13 @@ action: data: component: lightsettings.icon_state message: "{{ lightsettings_icon_font }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.font_color }}" data: component: lightsettings.icon_state message: "{{ lightsettings_icon_font_color }}" + continue_on_error: true ##### LIGHT State ##### - *delay-default - if: "{{ state_attr(entity_long, 'brightness') != none }}" @@ -4423,31 +4473,37 @@ action: data: component: lightsettings.lightslider message: "{{ (state_attr(entity_long, 'brightness') | int * 100 / 255) | round(0) }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: lightsettings.light_value message: "{{ (state_attr(entity_long, 'brightness') | int * 100 / 255) | round(0) }}%" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: lightsettings.light_value_2 message: "{{ (state_attr(entity_long, 'brightness') | int * 100 /255) | round(0) }}%" + continue_on_error: true else: - service: "{{ nextion.commands.value }}" data: component: lightsettings.lightslider message: '0' + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: lightsettings.light_value message: '0 %' + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: lightsettings.light_value_2 message: '0 %' + continue_on_error: true ##### LIGHT Check Color_Temp Value is available when yes send some current Values ##### - if: "{{ state_attr(entity_long, 'color_temp') != none }}" @@ -4457,16 +4513,19 @@ action: data: component: lightsettings.temp_value message: "{{ (state_attr(entity_long, 'color_temp') | int ) | round(0) }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: lightsettings.temp_value_2 message: "{{ (state_attr(entity_long, 'color_temp') | int ) | round(0) }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.value }}" data: component: lightsettings.tempslider message: "{{ (state_attr(entity_long, 'color_temp') | int ) | round(0) }}" + continue_on_error: true ## PAGE COVERSETTINGS ## - alias: Cover settings page @@ -4481,27 +4540,32 @@ action: data: component: coversettings.icon_state message: "{{ coversettings_icon_font }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.font_color }}" data: component: coversettings.icon_state message: "{{ coversettings_icon_font_color }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: coversettings.cover_name message: "{{ entity_long_name }}" + continue_on_error: true ##### COVER State - service: "{{ nextion.commands.value }}" data: component: coversettings.coverslider message: "{{ (state_attr(entity_long, 'current_position') | int ) | round(0) }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: coversettings.cover_value message: "{{ (state_attr(entity_long, 'current_position') | int ) | round(0) }} %" + continue_on_error: true ##### COVER Battery ICON Yes / NO ##### - variables: @@ -4523,18 +4587,21 @@ action: data: component: coversettings.battery_value message: "{{ battery_level | round(0) }} %" + continue_on_error: true ### ICON Battery Font Color ### - *delay-default - service: "{{ nextion.commands.font_color }}" data: component: coversettings.battery_icon message: "{{ nextion.colors.grey_super_light }}" + continue_on_error: true ### ICON Battery Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: coversettings.battery_icon message: "{{ nextion.icons.battery }}" + continue_on_error: true ## ENTITY PAGES 01 - 04 ## - alias: Entity pages @@ -4688,6 +4755,7 @@ action: data: component: "{{ 'entity%02d_label' | format(entity_page_index + 1) }}" message: "{{ entity_pages_labels[entity_page_index].label }}" + continue_on_error: true - *delay-default ##### Entities ##### - repeat: @@ -4704,6 +4772,7 @@ action: data: component: "{{ repeat.item.component }}_pic" message: "{{ repeat.item.icon }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: @@ -4713,11 +4782,13 @@ action: {%- elif repeat_item_state in ['unavailable', 'unknown', None] -%} {{ repeat.item.entity }} {%- else -%} {{ state_attr(repeat.item.entity, 'friendly_name') | default(mui[language].no_name) }} {%- endif -%} + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: "{{ repeat.item.component }}" message: "{{ repeat_item_state ~ ((state_attr(repeat.item.entity, 'unit_of_measurement') | default('')) if state_attr(repeat.item.entity, 'unit_of_measurement') else '') }}" + continue_on_error: true ## PAGE CLIMATE ## - alias: Climate page @@ -4733,16 +4804,19 @@ action: data: component: climate.climate_label message: "{{ entity_long_name }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: outdoor_temp message: "{{ (outdoor_temp | round(1) ~ weather_units.temperature) if is_number(outdoor_temp) else (mui[language].unavailable if outdoor_temp in ['unavailable', 'unknown', None] else outdoor_temp) }}" + continue_on_error: true - service: "{{ nextion.commands.text_printf }}" data: component: current_temp message: "{{ (state_attr(entity_long, 'current_temperature') | round(1) ~ weather_units.temperature) if is_number(state_attr(entity_long, 'current_temperature')) else '' }}" # mui[language].unavailable? + continue_on_error: true - if: "{{ hvac_mode != 'off' and is_number(state_attr(entity_long, 'temperature')) }}" then: - variables: @@ -4750,18 +4824,22 @@ action: - service: "{{ nextion.commands.thermostat_cycle }}" data: value: "{{ target_temp }}" + continue_on_error: true else: - service: "{{ nextion.commands.thermostat_cycle }}" data: value: "0" + continue_on_error: true - service: "{{ nextion.commands.text_printf }}" data: component: target_temp message: " " + continue_on_error: true - service: "{{ nextion.commands.text_printf }}" data: component: heating_state message: "{{ heating_state }}" + continue_on_error: true # HVAC Button PIC - variables: @@ -4770,6 +4848,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: heating_bt_pic.pic={{ heating_bt_pic }} + continue_on_error: true - variables: hotwatercharge_state: "{{ states(hotwatercharge) | default('unavailable') if hotwatercharge is string else 'unavailable' }}" hotwatertemp_state: "{{ states(hotwatertemp) | default('unavailable') if hotwatertemp is string else 'unavailable' }}" @@ -4778,6 +4857,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: hotw_bt_pic.pic={{ hotw_bt_pic }} + continue_on_error: true - if: "{{ hotwatertemp_state not in ['unavailable', 'unknown', None] }}" then: - *delay-default @@ -4785,6 +4865,7 @@ action: data: component: climate.hotwater_temp message: "{{ (hotwatertemp_state | round(1) ~ weather_units.temperature) if is_number(hotwatertemp_state) else hotwatertemp_state }}" + continue_on_error: true ## PAGE WEATHER (WEATHER01 to WEATHER05) ## - alias: Weather pages @@ -4800,6 +4881,7 @@ action: data: component: "{{ page_name }}.day" message: "{{ (dict.values(mui[language].relative_day) | list)[page_index] }}" + continue_on_error: true - *delay-default ##### Display date (long) ##### @@ -4808,6 +4890,7 @@ action: data: component: "{{ page_name }}.date" message: "{{ (dict.values(mui[language].weekdays) | list)[(now() + timedelta(days= (page_index))).weekday()] ~ ', ' ~ as_timestamp(now() + timedelta(days= (page_index))) | timestamp_custom(date_format) }}" + continue_on_error: true - *delay-default ##### Display weather data only when available ##### @@ -4871,6 +4954,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "{{ page_name }}.weather_icon.pic={{ nextion.pics.weather[states(weather_entity) | default('unavailable') if weather_entity is string else 'unavailable'] | default(None) if condition == 'unknown' and page_name == nextion.pages.weatherpages[0] else nextion.pics.weather[condition] | default(None) }}" + continue_on_error: true - *delay-default ##### Display temperature min/max when available @@ -4885,6 +4969,7 @@ action: data: component: "{{ page_name }}.temperature" ### Temperature MIN/MAX ### message: "{{ temperature_string }}" + continue_on_error: true - *delay-default ##### fields 1 to 5 (Parameters) ##### @@ -4895,17 +4980,20 @@ action: data: component: "{{ page_name }}.value0{{ repeat.index }}" message: "{{ repeat.item.value }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: "{{ page_name }}.value0{{ repeat.index }}_icon" message: "{{ repeat.item.icon }}" + continue_on_error: true - *delay-default else: # Display "Unavailable" - service: "{{ nextion.commands.text_printf }}" data: component: "{{ page_name }}.value01" message: "{{ mui[language].unavailable }}" + continue_on_error: true - *delay-default ## PAGE NOTIFICATION ## @@ -4916,11 +5004,13 @@ action: data: component: notification.notifi_text01 message: "{{ states(notification_text) | default(mui[language].unavailable) if notification_text is string else mui[language].unavailable }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: notification.notifi_label message: "{{ states(notification_label) | default(mui[language].unavailable) if notification_label is string else mui[language].unavailable }}" + continue_on_error: true ## PAGE QR Code ## - alias: QRCode page @@ -4935,11 +5025,13 @@ action: data: component: "qrcode_label" message: "{{ qrcode_label }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: "qrcode_value" message: "{{ qrcode_value }}" + continue_on_error: true ## PAGE SETTINGS ## #- alias: Settings page @@ -5055,6 +5147,7 @@ action: - service: "{{ nextion.commands.set_settings_entity }}" data: entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }}" + continue_on_error: true else: - if: "{{ last_click_button.confirm }}" then: @@ -5069,18 +5162,22 @@ action: - service: switch.turn_on data: entity_id: "{{ confirmation_message }}" + continue_on_error: true - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.notification }}" + continue_on_error: true - service: "{{ nextion.commands.text_printf }}" data: component: notification.notifi_text01 message: "{{ btn_entity_name }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: notification.notifi_label message: "{{ mui[language].please_confirm }}" + continue_on_error: true - wait_template: "{{ is_state(last_click, ['notificationacceptrelease', 'notificationclearrelease', 'homepage']) }}" timeout: seconds: 10 @@ -5091,9 +5188,11 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ buttonpage }}" + continue_on_error: true - service: switch.turn_off data: entity_id: "{{ confirmation_message }}" + continue_on_error: true - &service-button_changed service: >- {% if entity_domain in ['light', 'switch', 'cover', 'input_boolean', 'automation', 'fan'] %} @@ -5113,21 +5212,26 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ buttonpage }}" + continue_on_error: true - service: switch.turn_off data: entity_id: "{{ confirmation_message }}" + continue_on_error: true - conditions: "{{ is_state(last_click, 'homepage') }}" sequence: - service: switch.turn_off data: entity_id: "{{ confirmation_message }}" + continue_on_error: true default: - service: switch.turn_off data: entity_id: "{{ confirmation_message }}" + continue_on_error: true - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.home }}" + continue_on_error: true else: - *service-button_changed @@ -5158,6 +5262,7 @@ action: - service: "{{ nextion.commands.set_settings_entity }}" data: entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }},{{ entity_long_icon }},{{ entity_long_icon_color }}" + continue_on_error: true ##### LASTCLICK_LIGHTSETTINGS - changes on page lightsettings ##### - alias: Changes on page lightsettings @@ -5176,6 +5281,7 @@ action: data: entity_id: "{{ entity_long }}" brightness: "{{ (trigger.event.data.new_state.state | replace('brightness','') | int / 100 * 255) | round(0) }}" + continue_on_error: true #### wird nicht mehr benötigt, da es im nextion editor nun direkt gemacht wird # - delay: # milliseconds: "{{ delay_value }}" @@ -5210,6 +5316,7 @@ action: data: entity_id: "{{ entity_long }}" color_temp: "{{ trigger.event.data.new_state.state | replace('colortemp','') | int }}" + continue_on_error: true #### wird nicht mehr benötigt, da es im nextion editor nun direkt gemacht wird # - delay: # milliseconds: "{{ delay_value }}" @@ -5232,6 +5339,7 @@ action: data: entity_id: "{{ entity_long }}" rgb_color: "{{ trigger.event.data.new_state.state.split(',') }}" + continue_on_error: true ##### Page Lightsettings - Close Lightsetting Page ##### - conditions: @@ -5240,6 +5348,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ entity_back }}" + continue_on_error: true ##### LASTCLICK_COVERSETTINGS - changes on page coversettings ##### - alias: Changes on page coversettings @@ -5258,6 +5367,7 @@ action: data: entity_id: "{{ entity_long }}" position: "{{ trigger.event.data.new_state.state | replace('coverposition','') | int }}" + continue_on_error: true #### wird nicht mehr benötigt, da es im nextion editor nun direkt gemacht wird # - delay: # milliseconds: "{{ delay_value }}" @@ -5279,6 +5389,7 @@ action: - service: cover.close_cover data: entity_id: "{{ entity_long }}" + continue_on_error: true ##### Page Coversettings - Cover OPEN Button ##### - conditions: @@ -5287,6 +5398,7 @@ action: - service: cover.open_cover data: entity_id: "{{ entity_long }}" + continue_on_error: true ##### Page Coversettings - Cover STOP Button ##### - conditions: @@ -5295,6 +5407,7 @@ action: - service: cover.stop_cover data: entity_id: "{{ entity_long }}" + continue_on_error: true ##### Page Coversettings - Close Coversettings Page ##### - conditions: @@ -5303,6 +5416,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ entity_back }}" + continue_on_error: true ##### LASTCLICK_CLIMATESETTINGS - changes on page climatesettings ##### - alias: Changes on page climatesettings @@ -5325,6 +5439,7 @@ action: {% endif %} data: entity_id: "{{ hotwatercharge }}" + continue_on_error: true ##### Page Climatesettings - heating ##### - conditions: "{{ trigger.event.data.new_state.state == 'releaseheating' }}" @@ -5334,6 +5449,7 @@ action: - service: climate.turn_on ############ data: entity_id: "{{ entity_long }}" + continue_on_error: true # - service: climate.set_temperature # data: # entity_id: !input climate @@ -5343,6 +5459,7 @@ action: - service: climate.turn_off ############ data: entity_id: "{{ entity_long }}" + continue_on_error: true # - service: climate.set_temperature # data: # entity_id: !input climate @@ -5365,6 +5482,7 @@ action: - service: "{{ nextion.commands.thermostat_cycle }}" data: value: "{{ (current_setpoint + delta) | round(1) }}" + continue_on_error: true else: - variables: current_setpoint: "{{state_attr(entity_long, 'temperature') | default('unavailable') if entity_long is string else 'unavailable' }}" @@ -5375,6 +5493,7 @@ action: entity_id: "{{ entity_long }}" #hvac_mode: 'heat' temperature: "{{ (current_setpoint + delta) | round(1) }}" + continue_on_error: true ##### Page Climatesettings - climateslider ##### - conditions: '{{ trigger.event.data.new_state.state is match "climateslider\d+" and trigger.event.data.new_state.state == states(last_click_climatesettings) }}' @@ -5389,12 +5508,14 @@ action: - service: "{{ nextion.commands.thermostat_cycle }}" data: value: "{{ new_setpoint }}" + continue_on_error: true else: - service: climate.set_temperature data: entity_id: "{{ entity_long }}" #hvac_mode: 'heat' temperature: "{{ new_setpoint }}" + continue_on_error: true #### Page Climate - Close Climate Page ##### - conditions: @@ -5403,6 +5524,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ entity_back }}" + continue_on_error: true ##### TRIGGER - HOME PAGE ###### @@ -5462,10 +5584,12 @@ action: - service: "{{ nextion.commands.set_settings_entity }}" data: entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }}" + continue_on_error: true - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.climate }}" + continue_on_error: true ##### JUMP TO - Weather Page ##### - alias: Jump to weather page @@ -5478,6 +5602,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.weatherpages[0] }}" + continue_on_error: true ##### JUMP TO - QR Code Page ##### - alias: Jump to QR code page @@ -5490,6 +5615,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.qrcode }}" + continue_on_error: true ##### JUMP TO - ENTITY Page ##### - alias: Jump to entity page @@ -5502,6 +5628,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.entitypages[0] }}" + continue_on_error: true ##### JUMP TO - notification ##### - alias: Jump to notification page @@ -5514,6 +5641,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.notification }}" + continue_on_error: true #### SHOW BUTTON - notification #### - alias: Show button - Notification @@ -5543,6 +5671,7 @@ action: data: component: home.button04_icon message: "{{ set_button04_icon }}" + continue_on_error: true ##### SET ICON Font Color - Notify ##### - *delay-default @@ -5550,6 +5679,7 @@ action: data: component: home.button04_icon message: "{{ set_button04_icon_font }}" + continue_on_error: true ##### SHOW BUTTON - notification clear ##### - alias: Show button - Notification clear @@ -5562,9 +5692,11 @@ action: - service: switch.turn_off data: entity_id: "{{ notification_unread }}" + continue_on_error: true - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.home }}" + continue_on_error: true ##### SHOW BUTTON - notification accept ##### - alias: Show button - Notification accept @@ -5577,11 +5709,14 @@ action: - service: switch.turn_off data: entity_id: "{{ notification_unread }}" + continue_on_error: true - service: "{{ nextion.commands.notification_clear }}" data: {} + continue_on_error: true - service: "{{ nextion.commands.printf }}" data: cmd: "page {{ nextion.pages.home }}" + continue_on_error: true ##### BUTTON - press ##### - alias: Button - Press @@ -5615,6 +5750,7 @@ action: - service: "{{ nextion.commands.set_settings_entity }}" data: entity: "{{ entity_long }},{{ entity_back }},{{ entity_long_name }},{{ entity_long_icon }},{{ entity_long_icon_color }}" + continue_on_error: true - conditions: "{{ button_context.hold_select == 'Custom Action' and trigger.id == 'left_button_press' }}" sequence: !input left_button_hold_custom_action - conditions: "{{ button_context.hold_select == 'Custom Action' and trigger.id == 'right_button_press' }}" @@ -5636,6 +5772,7 @@ action: {% endif %} data: entity_id: "{{ button_context.entity }}" + continue_on_error: true ##### BUTTON - state ##### - alias: Button - State @@ -5654,6 +5791,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: "home.{{ 'left' if trigger.id == 'left_button_state' else 'right'}}_bt_pic.pic={{ current_hardware_button_state }}" + continue_on_error: true ##### DATE AND TIME ##### - alias: "Date & Time" @@ -5669,23 +5807,27 @@ action: data: component: home.time message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### TIME Font ### - service: "{{ nextion.commands.text_printf }}" data: component: home.time message: "{{ time }}" + continue_on_error: true ### TIME Meridiem Font Color ### - *delay-default - service: "{{ nextion.commands.font_color }}" data: component: home.meridiem message: "{{ page_home.general.time.label.color_rgb if is_number(page_home.general.time.label.color_rgb) else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### TIME Meridiem Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.meridiem message: "{{ meridiem }}" + continue_on_error: true ### DATE Font Color ### - *delay-default @@ -5693,12 +5835,14 @@ action: data: component: home.date message: "{{ page_home.general.date.label.color_rgb if is_number(page_home.general.date.label.color_rgb) else ((page_home.general.date.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.date.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.date.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### DATE Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.date message: "{{ (dict.values(mui[language].weekdays) | list)[now().weekday()] ~ ', ' ~ as_timestamp(now()) | timestamp_custom('%d.%m') }}" + continue_on_error: true ##### OUTDOOR TEMP - entity ##### - alias: Outdoor temp - Entity @@ -5715,12 +5859,14 @@ action: data: component: home.outdoor_temp message: "{{ page_home.general.outdoor_temp.label.color_rgb if is_number(page_home.general.outdoor_temp.label.color_rgb) else ((page_home.general.outdoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.outdoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.outdoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Outdoor Temp Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.outdoor_temp message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather_units.temperature }}" + continue_on_error: true ##### INDOOR TEMP - entity ##### - alias: Indoor temp - Entity @@ -5737,12 +5883,14 @@ action: data: component: home.current_temp message: "{{ page_home.general.indoor_temp.label.color_rgb if is_number(page_home.general.indoor_temp.label.color_rgb) else ((page_home.general.indoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Indoor Temp Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.current_temp message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather_units.temperature }}" + continue_on_error: true ##### INDOOR TEMP - nspanel ##### - alias: Indoor temp - NSPanel @@ -5761,12 +5909,14 @@ action: data: component: home.current_temp message: "{{ page_home.general.indoor_temp.label.color_rgb if is_number(page_home.general.indoor_temp.label.color_rgb) else ((page_home.general.indoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Indoor Temp Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.current_temp message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather_units.temperature }}" + continue_on_error: true ##### WEATHER STATE - change update ##### - alias: Weather - State changed @@ -5785,20 +5935,24 @@ action: data: component: home.outdoor_temp message: "{{ page_home.general.outdoor_temp.label.color_rgb if is_number(page_home.general.outdoor_temp.label.color_rgb) else ((page_home.general.outdoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.outdoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.outdoor_temp.label.color_rgb[2] //(2**3)) }}" + continue_on_error: true ### LABEL Outdoor Temp Font ### - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: home.outdoor_temp message: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}{{ weather_units.temperature }}" + continue_on_error: true - service: "{{ nextion.commands.text_printf }}" data: component: climate.outdoor_temp message: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}{{ weather_units.temperature }}" + continue_on_error: true - service: "{{ nextion.commands.printf }}" data: cmd: home.weather.pic={{ nextion.pics.weather[trigger.event.data.new_state.state | default('unknown')] }} + continue_on_error: true ##### Sync Climate ##### -> muss noch in page changed climate wwenn climate page fertig - alias: Climate - Sync @@ -5820,26 +5974,32 @@ action: data: component: current_temp message: "{{ trigger.event.data.new_state.attributes.current_temperature | round(1)}}{{ weather_units.temperature }}" + continue_on_error: true - service: "{{ nextion.commands.text_printf }}" data: component: heating_state message: "{{heating_state}}" + continue_on_error: true - service: "{{ nextion.commands.printf }}" data: cmd: heating_bt_pic.pic={{ heating_bt_pic }} + continue_on_error: true - if: "{{ trigger.event.data.new_state.state != 'off' }}" #### TODO AND->OR (not) not optimistic-mode then: - service: "{{ nextion.commands.thermostat_cycle }}" data: value: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}" + continue_on_error: true else: - service: "{{ nextion.commands.thermostat_cycle }}" data: value: "0" + continue_on_error: true - service: "{{ nextion.commands.text_printf }}" data: component: target_temp message: " " + continue_on_error: true ##### Sync Hotwater Charge button-symbol ##### -> kann wenn climate page fertig - alias: Hotwater - Sync @@ -5853,6 +6013,7 @@ action: - service: "{{ nextion.commands.printf }}" data: cmd: hotw_bt_pic.pic={{ hotw_bt_pic }} + continue_on_error: true ##### Hotwater Temp ##### kann raus und wird durch neue value 01 und value 02 ersetzt wenn climate page fertig - alias: Hotwater - Temp @@ -5866,11 +6027,13 @@ action: data: component: home.hotwater_temp message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather_units.temperature }}" + continue_on_error: true - *delay-default - service: "{{ nextion.commands.text_printf }}" data: component: climate.hotwater_temp message: "{{ trigger.event.data.new_state.state | round(1) }}{{ weather_units.temperature }}" + continue_on_error: true # - delay: # milliseconds: "{{ delay_value }}" # - service: "{{ nextion.commands.printf }}" @@ -5887,6 +6050,7 @@ action: seconds: 2 - service: "{{ nextion.commands.tft_upload }}" data: {} + continue_on_error: true #############################################################