-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Filter to: home kann entfernt werden, wenn man die anderen Meldungen auch haben möchte. | ||
# Weitere Personen können einfach hinzugefügt werden. | ||
# Siehe https://community.home-assistant.io/t/error-rendering-data-template-undefinederror-dict-object-has-no-attribute-from-state/325386/12 | ||
|
||
automation: | ||
- id: '1681559151264' | ||
alias: 'Notify: Familienmitglied kommt heim' | ||
description: '' | ||
trigger: | ||
- platform: state | ||
entity_id: | ||
- person.anna_mavie | ||
to: home | ||
condition: "{{ trigger.to_state.state != trigger.from_state.state }}" | ||
action: | ||
- variables: | ||
old: "{{ trigger.from_state.state }}" | ||
new: "{{ trigger.to_state.state }}" | ||
person: "{{ trigger.to_state.name }}" | ||
- service: notify.telegram_admin | ||
data: | ||
message: > | ||
{% if new == "not_home" and old == "home"%} | ||
{{ person }} ist weg gegangen. | ||
{% elif new == "home" %} | ||
{{ person }} ist zuhause. | ||
{% elif new == "not_home" %} | ||
{{ person }} ist von {{ old }} weg. | ||
{% else %} | ||
{{ person }} ist in {{ new }} angekommen. | ||
{% endif %} | ||
mode: single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters