waze_travel_time update template sensor example (#20019)

This commit is contained in:
SNoof85 2021-10-28 08:59:19 +02:00 committed by GitHub
parent 0566ada748
commit 0cfc528a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,20 +43,19 @@ input_select:
- Work - Work
- Parents - Parents
sensor: template:
- platform: template - sensor:
sensors: - name: "Destination address"
dest_address: state: >-
value_template: >- {%- if is_state("input_select.destination", "Home") -%}
{%- if is_state("input_select.destination", "Home") -%} 725 5th Ave, New York, NY 10022, USA
725 5th Ave, New York, NY 10022, USA {%- elif is_state("input_select.destination", "Work") -%}
{%- elif is_state("input_select.destination", "Work") -%} 767 5th Ave, New York, NY 10153, USA
767 5th Ave, New York, NY 10153, USA {%- elif is_state("input_select.destination", "Parents") -%}
{%- elif is_state("input_select.destination", "Parents") -%} 178 Broadway, Brooklyn, NY 11211, USA
178 Broadway, Brooklyn, NY 11211, USA {%- else -%}
{%- else -%} Unknown
Unknown {%- endif %}
{%- endif %}
``` ```