mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-28 16:57:14 +00:00
Too many updates to cover
This commit is contained in:
37
templates/jeff_eta.yaml
Normal file → Executable file
37
templates/jeff_eta.yaml
Normal file → Executable file
@@ -1,9 +1,42 @@
|
||||
>
|
||||
{% macro getIntro() %}
|
||||
{% if is_state("sensor.jeff_ett_home", "0") %}
|
||||
{% if is_state("sensor.jeff_location", "home") %}
|
||||
{{ [
|
||||
"I am not sure why you are asking me,",
|
||||
"You must be having vision problems.",
|
||||
"I don't want to alarm you, but"
|
||||
] | random }}
|
||||
Jeff is already home!
|
||||
{% else %}
|
||||
Jeff will be home in {{states.sensor.jeff_ett_home}} minutes.
|
||||
{% if is_state("sensor.jeff_destination", "na") %}
|
||||
{%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %}
|
||||
Jeff is currenly moving, but
|
||||
{{ [
|
||||
"I am unable to determine his destination.",
|
||||
"I am having trouble tracking him.",
|
||||
"His destination is currently unknown."
|
||||
] | random }}
|
||||
At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home.
|
||||
{%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %}
|
||||
Jeff is currenly moving, but
|
||||
{{ [
|
||||
"I am unable to determine his destination.",
|
||||
"I am having trouble tracking him.",
|
||||
"His destination is currently unknown."
|
||||
] | random }}
|
||||
At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home.
|
||||
{% else %}
|
||||
{% if is_state("sensor.jeff_location", "Lost") %}
|
||||
Jeff is lost, but at last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home.
|
||||
{% else %}
|
||||
Jeff is currently at {{ states.sensor.jeff_location.state }}.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elif is_state("sensor.jeff_destination", "home") %}
|
||||
Jeff is currenly heading home and will be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes.
|
||||
{% else %}
|
||||
Jeff is heading to {{ states.sensor.jeff_destination.state }}.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
|
Reference in New Issue
Block a user