Hello, is it possible to assign a variable sensor to the value Name: on a card?
I have two electric cars and a wallbox, and I have a template sensor that detects which car is currently connected. I would like to use this as the name in a Flow card, specifically here:
entity: sensor.evcc_carport_vehicle_soc
icon: mdi:car
use_metadata: false
color_icon: false
display_zero: false
color_value: false
calculate_flow_rate: true
inverted_animation: false
unit_of_measurement: “%”
name: Wallbox
So instead of Wallbox, the name of the car should always be displayed.
Probably the simplest way to do it would be to have two identical cards, one for each car, with only the name different. If you make them both conditional on the same sensor, true for one car, false for the other, the card will appear to change.
You would need some sort of sensor to indicate which car was on charge, though. I don’t see that on your list. Would your template do it?
It is possible to display a car’s name, but you will need to use card-mod and “after/before pseudo classes” technique.
Details here : main cardmod thread - 1st post - link named fantastic - others - using after/before.