Copy of binary sensor without filter

I want to make a copy of a binary switch component “pre-filtered” es:

binary_sensor:
  - platform: gpio
    pin: 27
    name: "PIR Sensor"
    device_class: motion
    id: presente
    internal: true
    on_press:
      then:
        - ......
    on_release:
      then:
        - -----
    filters:
      - delayed_off: 120s

I’d want to know the state of PIR (to copy it) as soon as it switch ON/OFF.

I would do it the other way around.

The GPIO binary_sensor is your immediate on/off.

The template copy gets filtered.

:innocent: thanks for the simple but ingenious solution. I’ll make the id “inversion” soon…