diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index 336e622..5afa494 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -115,11 +115,11 @@ wifi: password: ${ap_password} on_connect: - lambda: |- - disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected()) ? 1 : 0); + disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected() and blueprint_status->state > 99) ? 1 : 0); refresh_wifi_icon->execute(); on_disconnect: - lambda: |- - disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected()) ? 1 : 0); + disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected() and blueprint_status->state > 99) ? 1 : 0); refresh_wifi_icon->execute(); ##### OTA PASSWORD ##### @@ -183,11 +183,11 @@ api: reboot_timeout: 60min on_client_connected: - lambda: |- - disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected()) ? 1 : 0); + disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected() and blueprint_status->state > 99) ? 1 : 0); refresh_wifi_icon->execute(); on_client_disconnected: - lambda: |- - disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected()) ? 1 : 0); + disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected() and blueprint_status->state > 99) ? 1 : 0); refresh_wifi_icon->execute(); services: # Dynamically configures button properties on a specified page, enhancing UI interactivity by allowing updates to button appearance and behavior based on given parameters. @@ -1459,7 +1459,8 @@ sensor: then: - lambda: |- // Update api value on Nextion - disp1->send_command_printf("api=%i", (x > 99) ? 1 : 0); + disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected() and x > 99) ? 1 : 0); + refresh_wifi_icon->execute(); ##### INTERNAL TEMPERATURE SENSOR, ADC VALUE ##### - id: ntc_source