Skip to content

Instantly share code, notes, and snippets.

@tongphe
Last active May 4, 2020 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tongphe/9c907f3ee1c25a0e308eb7ca19a4ed04 to your computer and use it in GitHub Desktop.
Save tongphe/9c907f3ee1c25a0e308eb7ca19a4ed04 to your computer and use it in GitHub Desktop.
- id: notify_bad_login
alias: Send notification failed login attempt
initial_state: true
trigger:
- platform: state
entity_id: persistent_notification.http_login
condition:
- condition: template
value_template: '{{ trigger.to_state.state != ''None'' }}'
action:
- service: notify.telegram
data_template:
message: '{{ states.persistent_notification.http_login.attributes.message }}'
- service: persistent_notification.dismiss
data:
notification_id: http_login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment