alias: Marshall travel sensor mode: restart sequence: - service: input_text.set_value data_template: entity_id: input_text.person_marshall value: >- {% if is_state('input_boolean.marshall_home', 'on') %} {% if is_state('input_boolean.marshall_is_awake','off') %} Sleeping {% elif is_state('input_boolean.marshall_in_bed','on') %} In bed {% else %} {{ states("input_select.marshall_status_dropdown") }} {% endif %} {% elif is_state('group.person_marshall', 'home') and is_state('input_boolean.marshall_home', 'off') %} Near home ({{ states('input_select.marshall_status_dropdown') }}) {% else %} Away {% endif %}