Ask for locations with Assist
This commit is contained in:
24
custom_sentences/en/presence.yaml
Normal file
24
custom_sentences/en/presence.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
language: "en"
|
||||||
|
|
||||||
|
intents:
|
||||||
|
GetLocation:
|
||||||
|
data:
|
||||||
|
- sentences:
|
||||||
|
- "where is {person} [at] [(right now|currently)]"
|
||||||
|
- "give me [the] [current] location (of|for) {person}"
|
||||||
|
|
||||||
|
skip_words:
|
||||||
|
- "please"
|
||||||
|
- "can you"
|
||||||
|
|
||||||
|
lists:
|
||||||
|
person:
|
||||||
|
values:
|
||||||
|
- in: "(tony stork|tony|anthony|dad)"
|
||||||
|
out: "person.tony_stork"
|
||||||
|
- in: "(tina stork|christina stork|tina|christina|mom)"
|
||||||
|
out: "person.christina_stork"
|
||||||
|
- in: "(kallen stork|collin stork|kallen|collin)"
|
||||||
|
out: "person.kallen_stork"
|
||||||
|
- in: "(emmalynn stork|emma stork|emmalynn|emma)"
|
||||||
|
out: "person.emmalynn_stork"
|
@ -336,6 +336,20 @@ mqtt:
|
|||||||
payload_available: "online"
|
payload_available: "online"
|
||||||
payload_not_available: "offline"
|
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:
|
automation:
|
||||||
- id: kallen_at_school
|
- id: kallen_at_school
|
||||||
alias: Kallen is at School
|
alias: Kallen is at School
|
||||||
|
Reference in New Issue
Block a user