I have a Shelly ProEM measuring my air conditioning consumption. The Shelly add-on just create the device on HA and we don’t need to do anything else, that is just great.
Now, I have defined a utility meter to give me the information about how much I spent daily and monthly. My meter is defined as:
While it is working ok, the values shows 4 decimal digits and I would like to have only 2 decimal digits. However, if it were a standard sensor I could just use “round(2)” on the “value_template” and get the problem solved. But how do I “round()” a sensor that is created by Shelly add-on? Do I have to create an specific template for this?
I went to the entities and changed the precision. It works when I click on the entity from within the entities screen. However, on the lovelace card it keeps 5 decimal places.
So the question is: Is it there a way to round it for showing on a lovelace card?
Hmm, when I click on an entity from lovelace and get the entity info (history, value, etc.), then click on the cog in the upper right corner and change the Display precision then click update, it does change the precision on the lovelace display.
So, I’m not sure why you are getting different results unless you have a custom card that is fixing the precision. What card are you using to display the entity?
If I have a standard access to the entity I could round it (i.e.: sensors from MQTT). In the same way, I have no clue how I could set an unique ID for something coming from the Shelly integration.
The only thing I think as a solution is creating a sensor template, what is quite annoying if you have several sensors with this problem. And yes, it may be a problem on the Shelly integration.
I have a number of Shelly devices (not a ShellyPro EM) and I was able to successfully change the display precision. I don’t think it is a problem with the Shelly integration.
I found some discussions on GitHub about Shelly Pro EM 50 (Gen 2) issues. This might be related but the issue was closed. I’m assuming that “airconditioning_daily” is a friendly name for one of the actual entities?
Yes, I am measuring the air conditioning consumption. The data is ok, it shows what I need. The problem is the annoying 5 decimal places on the info. But the 5 decimals only shows on the lovelace card. The meter is defined as:
You are the guy MaxK! It works. Once I defined an UID and restarted the services I went to the card, click on entity and then on the cog. Now it allows for changing the resolution.