diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index 8a1c145..e4eaea5 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -1136,6 +1136,7 @@ text_sensor: // Report new page to Home Assistant ESP_LOGV("text_sensor.localevent", "Trigger HA event"); + auto ha_event = new esphome::api::CustomAPIDevice(); ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint", { {"type", "page_changed"}, @@ -1145,7 +1146,7 @@ text_sensor: // Report new page to add-ons ESP_LOGV("text_sensor.localevent", "Call add-ons scripts for new page"); - id(addon_climate_set_climate).execute(page=="climate" and id(entity_id) == "embedded_climate"); + id(addon_climate_set_climate).execute(x=="climate" and id(entity_id) == "embedded_climate"); // Construct new page ESP_LOGV("text_sensor.localevent", "Construct new page"); @@ -2375,14 +2376,6 @@ script: send_nextion_command("rest"); delay(1500); } - else - { - ESP_LOGD("script.upload_tft.upload_end_", "Turn off Nextion"); - //id(screen_power).turn_off(); - delay(1500); - ESP_LOGD("script.upload_tft.upload_end_", "Restarting esphome"); - ESP.restart(); - } return not retry; };