Fix operator error with IP address in ESPHome 2023.10
This commit is contained in:
@@ -723,7 +723,7 @@ display:
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGV("display.disp1.on_setup", "Nextion starting");
|
||||
id(disp1).goto_page("boot");
|
||||
if (id(current_page).state != "boot") id(disp1).goto_page("boot");
|
||||
id(disp1).send_command_printf("bkcmd=3");
|
||||
id(disp1).set_component_text_printf("boot.esph_version", "%s", "${version}"); // ### esphome-version ###
|
||||
id(disp1).show_component("bt_reboot");
|
||||
@@ -733,8 +733,7 @@ display:
|
||||
api.connected
|
||||
- lambda: |-
|
||||
ESP_LOGV("display.disp1.on_setup", "Publish IP address");
|
||||
auto ip = network::get_ip_address();
|
||||
id(disp1).set_component_text_printf("boot.ip_addr", "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
|
||||
id(disp1).set_component_text_printf("boot.ip_addr", "%s", network::get_ip_address().str().c_str());
|
||||
ESP_LOGV("display.disp1.on_setup", "Report to Home Assistant");
|
||||
auto ha_event = new esphome::api::CustomAPIDevice();
|
||||
ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
|
||||
@@ -742,8 +741,7 @@ display:
|
||||
{"type", "boot"},
|
||||
{"step", "start"}
|
||||
});
|
||||
- delay: 1s
|
||||
- lambda: |-
|
||||
delay(1000);
|
||||
// Set dimming values
|
||||
id(display_brightness).publish_state(id(display_brightness_global));
|
||||
id(display_dim_brightness).publish_state(id(display_dim_brightness_global));
|
||||
@@ -753,7 +751,7 @@ display:
|
||||
id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
||||
id(nextion_init).publish_state(true);
|
||||
ESP_LOGV("display.disp1.on_setup", "Report to Home Assistant");
|
||||
auto ha_event = new esphome::api::CustomAPIDevice();
|
||||
//auto ha_event = new esphome::api::CustomAPIDevice();
|
||||
ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
|
||||
{
|
||||
{"type", "boot"},
|
||||
|
||||
Reference in New Issue
Block a user