Limit push notifications to only 1 instead multiple

Oye.
Thank You. I appreciate the extra set of eyes.

Hi guys, i need some help. After 100+ tryes i want to cut my veins… please help. I don’t know where is the mistake, but this is not working. I’m using separate file for automations. It works perfectly, but without a condition.This is zwave reed sensor and it transmit status change 3-5 times in one action.

  • action:

    • service: notify.pushover
      data:
      message: “Home”
      title: “Unlocked”
      alias: Pushover if unlocked
      id: ‘1508430211001’
      trigger:
    • entity_id: sensor.front_door
      from: Lock
      platform: state
      to: Unlock
      condition:
      • condition: template
        value_template: ‘{{ (as_timestamp(now()) - as_timestamp(states.automation.pushover_if_unlocked.attributes.last_triggered | default(0)) | int > 500)}}’
  • action:

    • service: notify.pushover
      data:
      message: “Home”
      title: “Locked”
      alias: Pushover if locked
      id: ‘1508430211002’
      trigger:
    • entity_id: sensor.front_door
      from: Unlock
      platform: state
      to: Lock
      condition:
      • condition: template
        value_template: ‘{{ (as_timestamp(now()) - as_timestamp(states.automation.pushover_if_locked.attributes.last_triggered | default(0)) | int > 500)}}’

check this to format your code so we can look at it: