diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index 13f5012..fa90abf 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -1253,15 +1253,11 @@ api: then: - lambda: |- if (!id(is_uploading_tft) and !(id.empty())) { - if (!(icon.empty())) { - disp1->set_component_text_printf("%s_icon", id.c_str(), icon.c_str()); - if (icon_color.size() == 3) set_component_color->execute((id + "_icon").c_str(), icon_color); - } + if (!(icon.empty())) disp1->set_component_text_printf("%s_icon", id.c_str(), icon.c_str()); + if (icon_color.size() == 3) set_component_color->execute((id + "_icon").c_str(), icon_color); if (!(name.empty())) disp1->set_component_text_printf("%s_label", id.c_str(), name.c_str()); - if (!(value.empty())) { - disp1->set_component_text_printf("%s", id.c_str(), value.c_str()); - if (value_color.size() == 3) set_component_color->execute(id.c_str(), value_color); - } + if (!(value.empty())) disp1->set_component_text_printf("%s", id.c_str(), value.c_str()); + if (value_color.size() == 3) set_component_color->execute(id.c_str(), value_color); } # Wake Up Service diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index 29944e3..ae39b14 100644 Binary files a/hmi/nspanel_eu.HMI and b/hmi/nspanel_eu.HMI differ diff --git a/hmi/nspanel_eu.tft b/hmi/nspanel_eu.tft index ec85522..c033c81 100644 Binary files a/hmi/nspanel_eu.tft and b/hmi/nspanel_eu.tft differ diff --git a/hmi/nspanel_eu_code/home.txt b/hmi/nspanel_eu_code/home.txt index f3c93ea..e450593 100644 --- a/hmi/nspanel_eu_code/home.txt +++ b/hmi/nspanel_eu_code/home.txt @@ -57,7 +57,7 @@ Text time Touch Release Event settings_timer.en=0 -Text current_temp +Text indr_temp Attributes ID : 4 Scope : global @@ -300,7 +300,7 @@ Text wifi_icon Touch Release Event settings_timer.en=0 -Text indoortempicon +Text indr_temp_icon Attributes ID : 27 Scope : global diff --git a/hmi/nspanel_us.HMI b/hmi/nspanel_us.HMI index c3d389d..f474e10 100644 Binary files a/hmi/nspanel_us.HMI and b/hmi/nspanel_us.HMI differ diff --git a/hmi/nspanel_us.tft b/hmi/nspanel_us.tft index bcc2ef7..5981e4e 100644 Binary files a/hmi/nspanel_us.tft and b/hmi/nspanel_us.tft differ diff --git a/hmi/nspanel_us_code/home.txt b/hmi/nspanel_us_code/home.txt index f3c93ea..e450593 100644 --- a/hmi/nspanel_us_code/home.txt +++ b/hmi/nspanel_us_code/home.txt @@ -57,7 +57,7 @@ Text time Touch Release Event settings_timer.en=0 -Text current_temp +Text indr_temp Attributes ID : 4 Scope : global @@ -300,7 +300,7 @@ Text wifi_icon Touch Release Event settings_timer.en=0 -Text indoortempicon +Text indr_temp_icon Attributes ID : 27 Scope : global diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 9d6a3e2..ce44374 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -7358,19 +7358,16 @@ action: else state_attr(weather_entity, "temperature") | default("unavailable") if weather_entity is string else "unavailable" }} - - if: '{{ is_number(outdoor_temp) }}' - then: - - variables: - outdoor_temp_color_rgb: !input 'home_outdoor_temp_label_color' - - service: '{{ nspanel.service.value }}' - data: - id: home.outdoor_temp - icon: "" - icon_color: [] - name: "" - value: '{{ outdoor_temp | round(1) ~ temperature_units }}' - value_color: '{{ outdoor_temp_color_rgb }}' - continue_on_error: true + - condition: '{{ is_number(outdoor_temp) }}' + - service: '{{ nspanel.service.value }}' + data: + id: home.outdoor_temp + icon: "" + icon_color: [] + name: "" + value: '{{ outdoor_temp | round(1) ~ temperature_units }}' + value_color: !input home_outdoor_temp_label_color + continue_on_error: true - &refresh-page_home-indoor_temp if: '{{ true }}' @@ -7400,50 +7397,28 @@ action: else temperature_units ) }} - icon: - icon: !input 'home_indoor_temp_icon' - color_rgb: !input 'home_indoor_temp_icon_color' - label: - color_rgb: !input 'home_indoor_temp_label_color' + icon: !input 'home_indoor_temp_icon' - - if: '{{ is_number(indoor_temp.state) }}' - then: - ### ICON Indoor Temp Font Color ### - - service: '{{ nspanel.service.component.color }}' - data: - id: home.indoortempicon - color: '{{ indoor_temp.icon.color_rgb }}' - continue_on_error: true - ### ICON Indoor Temp Font ### - - service: '{{ nspanel.service.component.text }}' - data: - id: home.indoortempicon - txt: > + - condition: '{{ is_number(indoor_temp.state) }}' + - service: '{{ nspanel.service.value }}' + data: + id: home.indr_temp + icon: > {{ - all_icons[indoor_temp.icon.icon.split(":")[1]] | default(all_icons.thermometer) - if indoor_temp.icon.icon.split(":") | count > 0 + all_icons[indoor_temp.icon.split(":")[1]] | default(all_icons.thermometer) + if indoor_temp.icon.split(":") | count > 0 else ( - indoor_temp.icon.icon - if indoor_temp.icon.icon is string + indoor_temp.icon + if indoor_temp.icon is string else all_icons.thermometer ) }} - continue_on_error: true - ### LABEL Indoor Temp Font Color ### - - service: '{{ nspanel.service.component.color }}' - data: - id: home.current_temp - color: '{{ indoor_temp.label.color_rgb }}' - continue_on_error: true - - if: '{{ not embedded_indoor_temperature }}' - then: - ### LABEL Indoor Temp Font ### - - service: '{{ nspanel.service.component.text }}' - data: - id: home.current_temp - txt: '{{ indoor_temp.state | round(1) ~ indoor_temp.units }}' - continue_on_error: true + icon_color: !input home_indoor_temp_icon_color + name: "" + value: '{{ indoor_temp.state | round(1) ~ indoor_temp.units if not embedded_indoor_temperature else "" }}' + value_color: !input home_indoor_temp_label_color + continue_on_error: true ##### SET Hardware Buttons PIC on Home Page #### - &update_home_page_hw_buttons_pics