Use blueprint status to set api variable on TFT
This commit is contained in:
@@ -115,11 +115,11 @@ wifi:
|
|||||||
password: ${ap_password}
|
password: ${ap_password}
|
||||||
on_connect:
|
on_connect:
|
||||||
- lambda: |-
|
- 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();
|
refresh_wifi_icon->execute();
|
||||||
on_disconnect:
|
on_disconnect:
|
||||||
- lambda: |-
|
- 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();
|
refresh_wifi_icon->execute();
|
||||||
|
|
||||||
##### OTA PASSWORD #####
|
##### OTA PASSWORD #####
|
||||||
@@ -183,11 +183,11 @@ api:
|
|||||||
reboot_timeout: 60min
|
reboot_timeout: 60min
|
||||||
on_client_connected:
|
on_client_connected:
|
||||||
- lambda: |-
|
- 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();
|
refresh_wifi_icon->execute();
|
||||||
on_client_disconnected:
|
on_client_disconnected:
|
||||||
- lambda: |-
|
- 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();
|
refresh_wifi_icon->execute();
|
||||||
services:
|
services:
|
||||||
# Dynamically configures button properties on a specified page, enhancing UI interactivity by allowing updates to button appearance and behavior based on given parameters.
|
# 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:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
// Update api value on Nextion
|
// 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 #####
|
##### INTERNAL TEMPERATURE SENSOR, ADC VALUE #####
|
||||||
- id: ntc_source
|
- id: ntc_source
|
||||||
|
|||||||
Reference in New Issue
Block a user