Hi all,
I am trying to setup a card which shows me commute time.
I want to choose what to show
- from Home to Work ❯-❯-❯
- from Work to Home ❮-❮-❮
So, I created an input_select
to choose which direction to show: Home or Work.
How can I use templates to choose which entity to show?
I have tried with this configuration:
- type: vertical-stack
cards:
- type: entities
entities:
- entity: input_select.destination
- type: 'custom:travel-time-card'
entities:
- entity: >
{% if is_state("input_select.destination", "Home")
%}"sensor.work_home_travel_time" {% elif
is_state("input_select.destination", "Work")
%}"sensor.home_work_travel_time" {% endif %}
but It does not work as expected.