I did some research but I could not find the answer so I am asking some help to the community.
I have a bit less than 100 sensors that returns different values in different units (°C, % himiidity, % use, Mb, Gb, days, lux…) and I would like to have them rounded. I am looking for something similar to the format option for entity card (https://www.home-assistant.io/lovelace/entities/#format) but applicable to more sensor types
For example, all my temperatures have 2 decimals which is way too precise for me, I would need one decimal only. I have the same issue with humidity displaying 2 decimals but only need the integer value.
Currently I am creating one template per sensor which I find not very optimal for several reasons
Quite time consuming to create a new template_value every time I have a new sensor
My database is growing fast (unless I exclude manually the sensors which is not good in terms of maintenance)
I have a huge list of unused entities which is hard to find the ones that are not used due to newly added entities
Is there a way to have all entities formatted following a certain rule based on criteria ? (example: all entities with the unit °C to be rounded to one decimal).
You shouldn’t have to do this. Humidity and temperature are rounded on the UI in just about every card. Are you trying to round it on the backend for some reason? If so, why?
I am trying to change it at the frontend level (UI), I currently have a lot of xiaomi sensors and they are shown with 2 decimals. I do not need that much details. I know i am picky but I would like to have something clean with only the information I need.