The issue is that not all fields of a sensor can take a template that is evaluated. If the field isnāt setup to be template capable then you can only use a static value.
I has a similar issue when I wanted to change the friendly_name of a camera to text that represented the time the image was taken since the image would change every five minutes.
The solution I came up with in the end was to install the customizer add-on:
I then had a automation that triggered whenever the state changed on the sensor and this called the customizer service to update the friendly_name field.
You could use the same approach to change the unit_of_measurement field when the state changed depending on itās value.
I donāt think unit_of_measurement accepts value templates. When I posted that I was unsure. After this past month, Iām convinced itās not possible. If you want the version displayed as a sensor, you may want to suppress the ha_update_available sensor and make a new one that displays the version number as the status. Then just donāt use a unit_of_measure.
Hi there I am a newbie to Home Assistant, using HA for a final year school project! Following AnderssonPeterās ping sensor post, may I know from the configuration he posted is it all in one yaml file or in their own separate yaml files ie. binary_sensory.yaml, sensor.yaml? Would really appreciate the help! Thanks in advance
currently the UoM setting seems to break HA (0.85.0). I see constant errors (at least when using lovelace) and the frontend is unresponsive. Had to comment out the UoM line for now.
Havenāt updated to 0.84.6 because custom-ui author @andreyindicated _stateDisplay will lose customization possibility, this adds another downer to upgrading.
Im quite amazed how updating the HA versions which clearly focusses development
of Lovelace, deteriorates the regular HA frontend incrementallyā¦
And Lovelace missed a lot in customization options we had in regular HA. most prominent of these in my setup are customizations regarding per entity theming and coloring in Lovelace, extra badges, show_last_changed, etc etc.
If regular HA now starts to break down on all of these nice frontend improvement custom-ui made possible, that is a true disappointment.
That all being said, couldnāt it be something else is causing this issue in your setup?
I had quite some extra changes but none of them involved customizing theming etc. I just finally enabled the āupdate availableā badge in 0.84.6 just before moving to 0.85.0. I already reverted back to 0.84.6 for now and am testing if it works there properly.
other errors I noticed in 0.85.0 is weird page refreshes (at least in safari) and the complete theme setting to some white form where buttons went missing or even the complete page going to white.
Also my xiaomi gateways were not working properly, found some unable to connect errors in the logs but that might be related to a recent firmware update of the gateways, although it seems to work fine in 0.84.6.
I will enable things step by step to see what works and what not.
At least for now (for your sake) lovelace is not the default but that wil change in 0.86.0. I guess the groups.yaml will than still be possible to use with an extra configuration setting.
Extra customization features will come later on for lovelace, I have no doubt about it, but that will take some time.