Too many updates to cover

This commit is contained in:
Jeffrey Stone
2019-07-13 21:38:53 -04:00
parent 328ecf126c
commit d90380cc65
73 changed files with 1108 additions and 1171 deletions

37
templates/jeff_eta.yaml Normal file → Executable file
View 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 #}