Files
fresh-home/scripts/people/tess/tess_travel_sensor.yaml
T
2024-04-14 14:08:56 -04:00

21 lines
722 B
YAML

alias: Tess travel sensor
mode: restart
sequence:
- service: input_text.set_value
data_template:
entity_id: input_text.person_tess
value: >-
{% if is_state('input_boolean.tess_home', 'on') %}
{% if is_state('input_boolean.tess_is_awake','off') %}
Sleeping
{% elif is_state('input_boolean.tess_in_bed','on') %}
In bed
{% else %}
{{ states("input_select.tess_status_dropdown") }}
{% endif %}
{% elif is_state('group.person_tess', 'home') and is_state('input_boolean.tess_home', 'off') %}
Near home ({{ states('input_select.tess_status_dropdown') }})
{% else %}
Away
{% endif %}