home-assistant-configuration/alexa/intents.yaml

40 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2016-12-30 16:10:09 +00:00
intents:
WhereAreWeIntent:
speech:
type: plaintext
text: >
2016-12-31 19:18:56 +00:00
{%- if is_state('device_tracker.owntracks_jeffreysphone', 'home') and
is_state('device_tracker.katherinestonesiphone', 'home') -%}
2016-12-30 16:10:09 +00:00
You are both home
{%- else -%}
Jeff is at {{ states("device_tracker.owntracks_jeffreysphone") }}
and Kat is at {{ states("device_tracker.katherinestonesiphone") }}
2016-12-30 16:10:09 +00:00
{% endif %}
WhereIsJeffIntent:
speech:
type: plaintext
text: >
2016-12-31 19:18:56 +00:00
{%- if is_state('device_tracker.owntracks_jeffreysphone', 'home') -%}
2016-12-30 16:10:09 +00:00
It appears Jeff is here somewhere
{%- else -%}
2016-12-31 19:18:56 +00:00
{%- if is_state('device_tracker.owntracks_jeffreysphone', 'not_home') -%}
2016-12-30 16:10:09 +00:00
Jeff is not here
{%- else -%}
2016-12-31 19:18:56 +00:00
Jeff is at {{ states("device_tracker.owntracks_jeffreysphone") }}
2016-12-30 16:10:09 +00:00
{% endif %}
{% endif %}
WhereIsCatherineIntent:
speech:
type: plaintext
text: >
{%- if is_state('device_tracker.katherinestonesiphone', 'home') -%}
2016-12-30 16:10:09 +00:00
Kat is at home
{%- else -%}
{%- if is_state('device_tracker.katherinestonesiphone', 'not_home') -%}
2016-12-30 16:10:09 +00:00
Kat is not here
{%- else -%}
Kat is at {{ states("device_tracker.katherinestonesiphone") }}
2016-12-30 16:10:09 +00:00
{% endif %}
{% endif %}