esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
289 stars 36 forks source link

on_page is an invalid option for display.nextion error #6105

Closed roscsa77 closed 2 months ago

roscsa77 commented 2 months ago

The problem

When I want to put on_page: action under display.nextion block, I got the above error message!

Which version of ESPHome has the issue?

2022.2.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.7.3

What platform are you using?

ESP32

Board

ESP32 Wroom

Component causing the issue

Display.nextion

Example YAML snippet

- platform: nextion
    id: living_ac_temp
    uart_id: uart_2
    tft_url: http://192.168.0.100:8123/local/tft/teszt.tft    
    on_setup:
      - lambda: |-
          id(living_ac_temp).set_component_text_printf("lactemp", "%.0f", id(rotaryEncNappali35).state);
          id(living_ac_temp).set_component_text_printf("page0.txtNappaliTemp", "%.1f", id(nappali_current_temperature).state);
          id(living_ac_temp).set_component_text_printf("page1.txtNappaliTemp", "%.1f", id(nappali_current_temperature).state);
      - script.execute: set_preset_buttons_state
      - script.execute: set_fan_buttons_state
      - script.execute: nappali_hvac_buttons_state
    on_page:
      then:
        lambda: |-
          switch (x) {
            case 0x0:
              id(living_ac_temp).set_component_text_printf("lactemp", "%.0f", id(rotaryEncNappali35).state);
              id(living_ac_temp).set_component_text_printf("page0.txtNappaliTemp", "%.1f", id(nappali_current_temperature).state);
              break;
          }

Anything in the logs that might be useful for us?

No response

Additional information

No response

ssieb commented 2 months ago

You have an ancient version of esphome that is from before that was added.