-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintent_script.yaml
More file actions
33 lines (32 loc) · 1.05 KB
/
intent_script.yaml
File metadata and controls
33 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#https://community.home-assistant.io/t/ha-not-recognising-intents-from-alexa/26993/2
#https://github.com/auchter/haaska
WhereAreWeIntent:
speech:
type: plaintext
text: >
{%- if is_state('device_tracker.jerry_pixel3', 'home') and
is_state('device_tracker.louise_lc', 'home') -%}
You are both home, you silly
{%- else -%}
Louise is at {{ states("device_tracker.louise_lc") }}
and Jerry is at {{ states("device_tracker.jerry_pixel3") }}
{% endif %}
LocateIntent:
action:
service: notify.jerry
data_template:
message: The location of {{ User }} has been queried via Alexa.
speech:
type: plaintext
text: >
{%- for state in states.device_tracker -%}
{%- if state.name.lower() == User.lower() -%}
{{ state.name }} is at {{ state.state }}
{%- endif -%}
{%- else -%}
I am sorry, I do not know where {{ User }} is.
{%- endfor -%}
card:
type: simple
title: Sample title
content: Some more content