Fix climate page not opening when offline

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6834067
This commit is contained in:
Edward Firmo
2023-09-18 16:39:22 +02:00
parent 8859d8b229
commit ee5ccd0bff
13 changed files with 17 additions and 9 deletions

View File

@@ -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")
{