Event state node trigger multiple times

Hi all

I have this flow that check with four Event State nodes some door sensors.
Some times when a window or door is open I get more than one message, in some cases also very long time one from another.

Is there a way to trigger “from state off to on” and not just the on state, like in this automation:

- id: pf_cucina_open
  alias: Finestra cucina aperta - Notify
  trigger:
  - platform: state
    entity_id: binary_sensor.door_window_sensor_200
    from: 'off'
    to: 'on'
  action:
    service: notify.telegram
    data_template:
      message: Finestra cucina aperta alle {{ states('sensor.date__time') }}

Thanks

Hi ,
in the first node you can write a “halt” state off. so the automation will trigger when the state on is being reported.
You can also use bge (i think thats the name) node to make sure that automation work on the status change.

Hi

I cannot halt if state is off because I want to check from off to on and from on to off.

I’ve searched for a node called bge, but without success… :confused:

Thanks anyway.

Now I will try to use a switch to check if msg.payload is equal to msg.payload.old_state.state if this is the right way to do it.

its “rbe” sorry

Thanks, I’ll try!