Ask for locations with Assist

This commit is contained in:
2023-07-20 16:46:04 -04:00
parent 64607570f1
commit 29f637a823
2 changed files with 38 additions and 0 deletions

View File

@ -336,6 +336,20 @@ mqtt:
payload_available: "online"
payload_not_available: "offline"
intent_script:
GetLocation:
speech:
text: >
{% set location = states(person) %}
{% set name = state_attr(person,'friendly_name') %}
{% if location in ['away','not_home'] %}
{{ name }} is currently away from home
{% elif location in ['unavailable','unknown'] %}
I do not have a current location for {{ name }}
{% else %}
{{ name }} is currently at {{ location }}
{% endif %}
automation:
- id: kallen_at_school
alias: Kallen is at School