home-assistant-configuration/alexa/intents.yaml

40 lines
1.4 KiB
YAML
Executable File

intents:
WhereAreWeIntent:
speech:
type: plaintext
text: >
{%- if is_state('device_tracker.owntracks_jeffreysphone', 'home') and
is_state('device_tracker.katherinestonesiphone', 'home') -%}
You are both home
{%- else -%}
Jeff is at {{ states("device_tracker.owntracks_jeffreysphone") }}
and Kat is at {{ states("device_tracker.katherinestonesiphone") }}
{% endif %}
WhereIsJeffIntent:
speech:
type: plaintext
text: >
{%- if is_state('device_tracker.owntracks_jeffreysphone', 'home') -%}
It appears Jeff is here somewhere
{%- else -%}
{%- if is_state('device_tracker.owntracks_jeffreysphone', 'not_home') -%}
Jeff is not here
{%- else -%}
Jeff is at {{ states("device_tracker.owntracks_jeffreysphone") }}
{% endif %}
{% endif %}
WhereIsCatherineIntent:
speech:
type: plaintext
text: >
{%- if is_state('device_tracker.katherinestonesiphone', 'home') -%}
Kat is at home
{%- else -%}
{%- if is_state('device_tracker.katherinestonesiphone', 'not_home') -%}
Kat is not here
{%- else -%}
Kat is at {{ states("device_tracker.katherinestonesiphone") }}
{% endif %}
{% endif %}