Node-RED stopped supporting text_sensors

Hi,
After a few months I decided to update my HomeAssistant (Home Assistant OS core: 2025.9.1, Supervisor: 2025.09.0), EspHome (2025.8.4), NodeRed (addon: ver. 20.0.).
Unfortunately, it occurred that Node-RED stopped working with text_sensors, which I am using for in some binary sensor for capturing press & hold case.
The Node-Red ‘event: state’ block seems to not receiving text_sensor entities values at all (I also checked ‘events: all’ block). Logs from ESP shows that the text_sensor value was sent. The text_sensor entity is available to set in the block configuration, but it doesn’t work completely.
Binary sensors, temperature sensors work correctly.
I tested blocks by adding debug block. There wasn’t any error/warning logs from Node-RED.

Is it a bug or should I change something in configuration?

ESP code:

text_sensor:
  - platform: template
    name: "Syp_I_L1_opt3"
    id: id_syp_l_i_1
    icon: "mdi:toggle-switch"
    on_value:  # When a state is set
      then:
        - if:
            condition:
              text_sensor.state:
                id: id_syp_l_i_1
                state: ""
            else:  # If non-empty
              - delay: 20ms
              - text_sensor.template.publish:
                  id: id_syp_l_i_1
                  state: !lambda 'return "";'  # Reset to empty
                  
binary_sensor:
  - platform: gpio
    name: "Syp_I_L1"
    pin:
      number: 34
      inverted: True
      mode: INPUT
    filters:
      - delayed_on_off: 10ms
    on_multi_click:
      - timing:
          - ON for 40ms to 400ms
          - OFF for at least 50ms
        then:
          - text_sensor.template.publish:
              id: id_syp_l_i_1
              state: !lambda 'return "single";'
      - timing:
          - ON for at least 1s
        then:
          - text_sensor.template.publish:
              id: id_syp_l_i_1
              state: !lambda 'return "hold";'

Make sure the Node-RED Companion custom integration is updated to the latest release.

You can check the version you currently have installed by using the diagnostic button in Node-RED:
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/diagnostics.html

I reinstalled Node-RED from HomeAssistant add-ons. There wasn’t any issue while installer. There isn’t any error in Node-RED logs. There isn’t any error while deploying

Version: 0.77.1

Home Assistant instances: 5
Server: 5efee9dd.a8d938
Home Assistant version: 2025.9.1
Companion version: 0.0.0
Server: 4cbcc8b4.091f98
Home Assistant version: 2025.9.1
Companion version: 0.0.0
Server: e59e27b2.87ef58
Home Assistant version: 2025.9.1
Companion version: 0.0.0
Server: 7875cd8.911e634
Home Assistant version: 2025.9.1
Companion version: 0.0.0
Server: c80051a2.e065
Home Assistant version: 2025.9.1
Companion version: 0.0.0

Node-RED version: 4.0.9
Docker: yes
Add-on: 20.0.0

Node.js version: v22.16.0 x64 linux
OS: Linux 6.12.43-haos x64

You should share the event state node settings that you are using. Also set up a simple automation in home assistant to trigger off the sensor and see if that fires.

I found the issue. The delay in ESP was set to 20ms, so the state was set to ‘hold’ then to empty in 20ms - probably Node-RED cannot capture so fast change.
Everything works when I changed to 110ms.