Skip to content

Instantly share code, notes, and snippets.

@andrew-codechimp
Created November 2, 2022 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrew-codechimp/fabec74d8ff127b2a809339cd6a02213 to your computer and use it in GitHub Desktop.
Save andrew-codechimp/fabec74d8ff127b2a809339cd6a02213 to your computer and use it in GitHub Desktop.
Home Assistant Post Notification Example
alias: Post Notification
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.z2maqarareed01_contact
to: "on"
from: "off"
condition:
- condition: template
value_template: >-
{{ (as_timestamp(now()) -
as_timestamp(state_attr('automation.post_notification', 'last_triggered')
| default(0)) | int > 30) }}
action:
- service: notify.telegram
data:
message: You have post
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment