The issue is the last line which is showing “pv”
This sensor can have these 4 states
off, now, minpv, pv.
But I want to replace those with a more descriptive one for the UI / users
“pv” should be shown as “PV surplus only”
“minpv” should be shown as “min grid + PV surplus”
“now” should be shown as “fast charge”
“off” should be shown as “off”
now it has been solved even though I could not figure out my mistake.
I started from scratch with 2 cases or states and from there expanded it one by one incl. testing.
state_display: |
[[[
if (entity.state === 'pv')
return 'PV pur';
else
if (entity.state === 'pvmin')
return 'PV + min. Netz';
else
if (entity.state === 'now')
return 'VOLLGAS';
else
return 'KEIN LADEPROGRAMM';
]]]
The result is the last line under the icon which shows that the charger is ready to charge (first line) and would use PV pur(e) mode aka “pure solar power”
Not worth the effort for many , but if you have elderly over 80 years driving electric for already 5 years then you will do your best to make their lives easier.
Before they had a “granny charger” aka “brick charger” from VW / AUDI only charging 2 kW and then a faster one with 3,6 kW
But now they have an 11 kW charger and came down from 16 hours of full charging time over 10 hours to 4 hours.
Keypoint was that elderly could easily identify if the car is connected or not and to which charging mode the charger has been set to.
Now the charging station and the charger have gotten coloured.
a green card means : PV only
a light green card means: PV + minimum of what is needed from the grid to charge
a orange card is half a warning cause it is: fastest charging no matter what (up to 11 kW)
a RED card: off, no charge mode selected
Here is an overview from the editing mode where a lot of hidden cards are visible
And then there is the “wallboxed gas station” it self
which is WHITE if the car is not connected
which then becomes BLACK if the car is connected but not charging
and then becomes GOLD if the car is finally charging
or in short
WHITE = UNCONNECTED
BLACK = CONNECTED
GOLD = CHARGING
and finally the UI of the productive version with car battery and home storage