diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index fe76935..87199d6 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -3529,7 +3529,7 @@ blueprint: media_player_update_interval: name: Media player - Update interval description: Interval (msec) to call for an update from the media player entity. Lower values will improve the responsiveness, but could spam your Home Assistant with constant requests, while higher values will reduce the load on HA but the Media Player page can be laggy. - default: 3000 + default: 5000 selector: number: min: 500 diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 3a3b4fb..267c5c1 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -852,7 +852,7 @@ api: id(last_media_position) = media_position; id(disp1).set_component_value("prg_current", int(round(min(media_position + media_position_delta, media_duration)))); } - id(disp1).set_component_value("prg_total", media_duration); + id(disp1).set_component_value("prg_total", int(round(media_duration))); id(disp1).send_command_printf("prg_timer.en=%i", (state == "playing") ? 1 : 0); id(disp1).show_component("time_current"); id(disp1).show_component("time_total"); @@ -1357,7 +1357,7 @@ text_sensor: {"entity", entity} }); ESP_LOGV("text_sensor.nspanelevent", "Call add-ons scripts for new page"); - id(addon_climate_set_climate).execute(page=="climate" and entity=="embedded_climate"); + id(addon_climate_set_climate).execute(page=="climate" and entity == "embedded_climate"); ESP_LOGV("text_sensor.nspanelevent", "Publish current_page sensor"); id(current_page).publish_state(page); ESP_LOGV("text_sensor.nspanelevent", "Construct new page"); @@ -1497,7 +1497,11 @@ text_sensor: else if (event=="short_click" or event=="long_click") id(ha_button).execute(page.c_str(), component.c_str(), event.c_str()); else if (event=="click") { - if (page == "home" and component == "climate") id(entity_id) = (id(is_embedded_thermostat)) ? "embedded_climate" : ""; + if (page == "home" and component == "climate") + { + id(entity_id) = (id(is_embedded_thermostat)) ? "embedded_climate" : ""; + id(disp1).set_component_value("climate.embedded", (id(is_embedded_thermostat)) ? 1 : 0); + } id(disp1).goto_page("climate"); } else if (page == "light" or page == "climate" or page == "notification")// Generic event diff --git a/nspanel_esphome_addon_climate_cool.yaml b/nspanel_esphome_addon_climate_cool.yaml index 7c0b096..085da7f 100644 --- a/nspanel_esphome_addon_climate_cool.yaml +++ b/nspanel_esphome_addon_climate_cool.yaml @@ -74,7 +74,8 @@ script: ESP_LOGV("script.addon_climate_update_page_home", "Starting"); // Update home.climate_entity variable ESP_LOGV("script.addon_climate_update_page_home", "Update home.climate_entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); - id(disp1).set_component_text_printf("home.climate_entity", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); + id(entity_id) = (id(is_embedded_thermostat)) ? "embedded_climate" : ""; + id(disp1).set_component_value("climate.embedded", (id(is_embedded_thermostat)) ? 1 : 0); // Update chips if (id(is_embedded_thermostat)) { @@ -88,6 +89,7 @@ script: - lambda: |- ESP_LOGV("script.addon_climate_service_call", "Starting"); id(is_addon_climate_visible) = true; + id(disp1).set_component_value("climate.embedded", 1); auto call = id(thermostat_embedded).make_call(); if (key == "set_temperature") { diff --git a/nspanel_esphome_addon_climate_heat.yaml b/nspanel_esphome_addon_climate_heat.yaml index 52a2740..8e8ec71 100644 --- a/nspanel_esphome_addon_climate_heat.yaml +++ b/nspanel_esphome_addon_climate_heat.yaml @@ -74,7 +74,8 @@ script: ESP_LOGV("script.addon_climate_update_page_home", "Starting"); // Update home.climate_entity variable ESP_LOGV("script.addon_climate_update_page_home", "Update home.climate_entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); - id(disp1).set_component_text_printf("home.climate_entity", (id(is_embedded_thermostat)) ? "embedded_climate" : ""); + id(entity_id) = (id(is_embedded_thermostat)) ? "embedded_climate" : ""; + id(disp1).set_component_value("climate.embedded", (id(is_embedded_thermostat)) ? 1 : 0); // Update chips if (id(is_embedded_thermostat)) { @@ -88,6 +89,7 @@ script: - lambda: |- ESP_LOGV("script.addon_climate_service_call", "Starting"); id(is_addon_climate_visible) = true; + id(disp1).set_component_value("climate.embedded", 1); auto call = id(thermostat_embedded).make_call(); if (key == "set_temperature") { diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index 2292e0b..142e6e3 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu.tft b/nspanel_eu.tft index d1010e1..b2bb25e 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_eu_code/climate.txt b/nspanel_eu_code/climate.txt index b03651f..43a7102 100644 --- a/nspanel_eu_code/climate.txt +++ b/nspanel_eu_code/climate.txt @@ -120,7 +120,7 @@ Variable (string) back_page Variable (int32) embedded Attributes ID : 46 - Scope: local + Scope: global Value: 0 Variable (string) va2 diff --git a/nspanel_us.HMI b/nspanel_us.HMI index 4ce2ace..ab6b62f 100644 Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ diff --git a/nspanel_us.tft b/nspanel_us.tft index e753ecd..3841f64 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_code/climate.txt b/nspanel_us_code/climate.txt index 1e5cdf4..56cf2d7 100644 --- a/nspanel_us_code/climate.txt +++ b/nspanel_us_code/climate.txt @@ -120,7 +120,7 @@ Variable (string) back_page Variable (int32) embedded Attributes ID : 46 - Scope: local + Scope: global Value: 0 Variable (string) va2 diff --git a/nspanel_us_land.HMI b/nspanel_us_land.HMI index c0f6e5c..8045413 100644 Binary files a/nspanel_us_land.HMI and b/nspanel_us_land.HMI differ diff --git a/nspanel_us_land.tft b/nspanel_us_land.tft index 89876ff..7646b7f 100644 Binary files a/nspanel_us_land.tft and b/nspanel_us_land.tft differ diff --git a/nspanel_us_land_code/climate.txt b/nspanel_us_land_code/climate.txt index b03651f..43a7102 100644 --- a/nspanel_us_land_code/climate.txt +++ b/nspanel_us_land_code/climate.txt @@ -120,7 +120,7 @@ Variable (string) back_page Variable (int32) embedded Attributes ID : 46 - Scope: local + Scope: global Value: 0 Variable (string) va2