Nextion - question on receiving sensordata in home assistant

I have Nextion display prepared via the editor. It is correctly connected to ESPhome. I can see in esphome that the buttons created on nextion when pressed generate an event in esphome:

[15:31:56][D][nextion:209]: Got touch page=0 component=6 type=RELEASE
[15:31:57][D][nextion:209]: Got touch page=0 component=6 type=RELEASE
[15:31:58][D][nextion:209]: Got touch page=0 component=6 type=RELEASE
[15:31:59][D][nextion:209]: Got touch page=0 component=7 type=RELEASE
[15:32:00][D][nextion:209]: Got touch page=0 component=9 type=RELEASE
[15:32:01][D][nextion:209]: Got touch page=0 component=2 type=RELEASE
[15:32:01][D][nextion:209]: Got touch page=0 component=3 type=RELEASE

I do not see (not in history, not in node-red) that the button is pressed. The esphome is correctly imported as an integration (and corresponding device & entity) in home assistant.

What could be wrong?

ps. this setup is exactly the same as another nextion display setup I have running except it is a 2.4 inch and this is a 3.2 inch.

the config:

esphome:
  name: nextionkap
  platform: ESP8266
  board: d1_mini_pro

wifi:
  ssid: "IOTDOM"
  password: "12345678"
  use_address: 192.168.6.19
  domain: .me.local


  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Nextionkap Fallback Hotspot"
    password: "0WQ3zCMCMlVV"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

web_server:
  port: 80

uart:
  rx_pin: D7
  tx_pin: D5
  baud_rate: 9600

display:
  - platform: nextion
#    lambda: |-
#      it.set_wait_for_ack(false);

text_sensor:
  - platform: homeassistant
    id: t10_text
    entity_id: sensor.nextion_text1

binary_sensor:
  - platform: nextion
    page_id: 0
    component_id: 3
    name: "Nextionkap.Lamp1"
  - platform: nextion
    page_id: 0
    component_id: 2
    name: "Nextionkap.Lamp2"
  - platform: nextion
    page_id: 0
    component_id: 6
    name: "Nextionkap.3"
  - platform: nextion
    page_id: 0
    component_id: 7
    name: "Nextionkap.4"
  - platform: nextion
    page_id: 0
    component_id: 9
    name: "Nextionkap.5"

switch:
  - platform: uart
    name: "nextionkap.dim1"
    data: 'dim=1'
  - platform: uart
    name: "nextionkap.dim20"
    data: 'dim=20'
  - platform: uart
    name: "nextionkap.dim100"
    data: 'dim=100'
  - platform: uart
    name: "nextionkap.dimsave"
    data: [0xFF, 0xFF, 0xFF]

All entiteis (binary sensors and switches) are created in home assistant.

I think you need to make the action in esphome.
This is waht i have and it works

  - platform: nextion
    page_id: 9
    component_id: 7
    id: buro_lamp
    filters:
      - delayed_on: 30ms
      - delayed_off: 30ms      
    on_press:
      then:
        - homeassistant.service:
            service: light.toggle
            data:
              entity_id: light.kantoor_buro_lamp

So, what I have now done as a workaround is also ticked the

and then it works. But I would thus like to only use the “touch release event”…

Is that what your code does?

Not sure what this should do:

filters:
      - delayed_on: 30ms
      - delayed_off: 30ms      
    on_press:
      then:

Maybe you will need the on_release instaid of on_press

More info on the filters