Clean-up
This commit is contained in:
@@ -110,13 +110,9 @@ wifi:
|
|||||||
ssid: ${wifi_ssid}
|
ssid: ${wifi_ssid}
|
||||||
password: ${wifi_password}
|
password: ${wifi_password}
|
||||||
on_connect:
|
on_connect:
|
||||||
- lambda: |-
|
- script.execute: refresh_wifi_icon
|
||||||
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:
|
on_disconnect:
|
||||||
- lambda: |-
|
- script.execute: refresh_wifi_icon
|
||||||
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 #####
|
##### OTA PASSWORD #####
|
||||||
ota:
|
ota:
|
||||||
@@ -178,13 +174,9 @@ api:
|
|||||||
id: api_server
|
id: api_server
|
||||||
reboot_timeout: 60min
|
reboot_timeout: 60min
|
||||||
on_client_connected:
|
on_client_connected:
|
||||||
- lambda: |-
|
- script.execute: refresh_wifi_icon
|
||||||
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:
|
on_client_disconnected:
|
||||||
- lambda: |-
|
- script.execute: refresh_wifi_icon
|
||||||
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:
|
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.
|
||||||
- service: button # yamllint disable-line rule:indentation
|
- service: button # yamllint disable-line rule:indentation
|
||||||
@@ -282,7 +274,7 @@ api:
|
|||||||
if (entity_id.domain != "invalid" or entity == "embedded_climate") {
|
if (entity_id.domain != "invalid" or entity == "embedded_climate") {
|
||||||
detailed_entity->publish_state(entity);
|
detailed_entity->publish_state(entity);
|
||||||
if (entity_id.domain == "alarm_control_panel") entity_id.domain = "alarm";
|
if (entity_id.domain == "alarm_control_panel") entity_id.domain = "alarm";
|
||||||
disp1->send_command_printf("page %s", entity_id.domain.c_str());
|
disp1->goto_page(entity_id.domain.c_str());
|
||||||
disp1->send_command_printf("back_page_id=%" PRIu8, get_page_id(back_page.c_str()));
|
disp1->send_command_printf("back_page_id=%" PRIu8, get_page_id(back_page.c_str()));
|
||||||
if (entity_id.domain == "climate")
|
if (entity_id.domain == "climate")
|
||||||
disp1->set_component_value("embedded", (entity == "embedded_climate") ? 1 : 0);
|
disp1->set_component_value("embedded", (entity == "embedded_climate") ? 1 : 0);
|
||||||
@@ -1446,10 +1438,7 @@ sensor:
|
|||||||
return 0;
|
return 0;
|
||||||
on_value:
|
on_value:
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- script.execute: refresh_wifi_icon
|
||||||
// Update api value on Nextion
|
|
||||||
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
|
||||||
@@ -2442,6 +2431,7 @@ script:
|
|||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (nextion_init->state) {
|
if (nextion_init->state) {
|
||||||
|
disp1->send_command_printf("api=%i", (wifi_component->is_connected() and api_server->is_connected() and blueprint_status->state > 99) ? 1 : 0);
|
||||||
// Update Wi-Fi icon color
|
// Update Wi-Fi icon color
|
||||||
disp1->set_component_font_color("home.wifi_icon", (blueprint_status->state > 99) ? (wifi_rssi->state > -70 ? 33808 : 64992) : 63488);
|
disp1->set_component_font_color("home.wifi_icon", (blueprint_status->state > 99) ? (wifi_rssi->state > -70 ? 33808 : 64992) : 63488);
|
||||||
// Update Wi-Fi icon
|
// Update Wi-Fi icon
|
||||||
|
|||||||
Reference in New Issue
Block a user