Esphome button hold

Hello, I’m trying to use press and hold functions for the button but when I hold the button it keeps sending state on and state off while holding instead of state on when I hold and state off when I release.
Does anyone know what is the problem?
When I invert it works correct just the states are on after releasing and off while holding.

Code and logs and wiring.

[12:36:38][D][binary_sensor:036]: ‘button_1’: Sending state ON
[12:36:38][D][binary_sensor:036]: ‘button_1’: Sending state OFF
[12:36:38][D][binary_sensor:036]: ‘button_1’: Sending state ON
[12:36:39][D][binary_sensor:036]: ‘button_1’: Sending state OFF
[12:36:39][D][binary_sensor:036]: ‘button_1’: Sending state ON
[12:36:39][D][binary_sensor:036]: ‘button_1’: Sending state OFF
[12:36:39][D][binary_sensor:036]: ‘button_1’: Sending state ON
[12:36:40][D][binary_sensor:036]: ‘button_1’: Sending state OFF
[12:36:40][D][binary_sensor:036]: ‘button_1’: Sending state ON
[12:36:40][D][binary_sensor:036]: ‘button_1’: Sending state OFF

This happens while I’m holding

please format code. …

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO10
      mode: INPUT
      inverted: true
    id: button_1
    internal: true
    filters:
      - delayed_on: 20ms
      - delayed_off: 20ms
    on_multi_click:
      - timing:
          - ON for 40ms to 400ms
          - OFF for at least 50ms
        then:
         - light.toggle: light_1
         - logger.log: Button Pressed
      - timing:
          - ON for at least 1s
        then:
          - light.turn_off: light_1
          - logger.log: Button Hold