Sensor output in name:

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.

Is that possible?

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?

Hi Jack that will be not work i will the name of this card change where at the moment stay Wallbox

Looks like power flow card plus, why can’t you have two separate versions?

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.

Thanks IIdar but i not fount this post?

here

1 Like

Thanks a lot i will test it.