In HA 2021.8 the power consumption page has been introduced and I want to use it.
I gather power consumption information from several smart sockets. And I have the template sensor which represents overall power consumption. But I can’t initialize new power consumption card because it’s said that there is no statistics.
The documentation doesn’t show the state_class option for legacy Template Sensor. My understanding is that the energy integration includes entities containing that option (and set to measurement). Without that option, the entity is excluded.
Easy way to find out is to convert one or more of your Template Sensors from legacy to the new format and add state_class: measurement.
Thanks all for your info in this post, it’s been helping me to progress this. Unfortunately I’ve not be able to get it working and I’ve tried both old and new template sensors.
I’m using a Shelly EM which works great and sends its data using MQTT. Here’s a simple card with the data items:
Ive got the point where after 4 hours of trial and error i’m giving up for a while in the hope that HA will recognise the entity in the “Energy” UI once its populated with some more data…
I have a problem too.
The “cost” is not recalculated to me.
But in the interface, the data is displayed.
My localization is “RU”
What am I doing wrong. Thanks
I’m fighting with this, but no success, maybe someone can help?
Got you! I have changed W to Wh, however, nothing show up again, do I need to restert HA?
UPDATE:
Ok so what you need to do in order for the thing to work: make sure you have Energy kWh measurement in your system, I have it in configuration file.
If you have Power, which is instant measurements, you can change it to kWh, which mend that if you use instant data 1 hr and devide it to 1000 you will have kWh: