Thanks for this very nice impression on how I want to have my own consumption dashboard
I tried to re-create it but I can not figure out which custom cards you used for the Last Day / Last 10 days cards, and also for the 3 cards on the right with the beautiful graphing.
Also, how did you calculate the summaries in the Energy Usage/Cost Summary?
Finally, the cost for the last hour, day, month is calculation using templates with the Standard Tariff (p/kWh) and Standing Charge (GBP/month) being input_number helpers:
Since the Home Assistant energy monitoring features were introduced a few months ago a lot of what I did here has been kind of superceded. The one area where HA is lacking though is on the energy cost calculations and inclusion of a daily/monthly standing charge and different trariffs. This may come in time though.
Hi, I have been using energy management for a while. Recently I noticed some warnings about two sensors (which strangely had values anyway). I had forgot to configure device_class and state_class. So I added it to configuration.yaml
sensor.energia_exportada_kwh:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
sensor.yc600_producao_kwh:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
Now the warning is gone but the values for this sensors for today is the total accumultated value (and not the delta for today).
By the way, this sensors are already in kwh and are calculated with the integration component.
What have I done wrong?
I’ve fixed the problem but probably won’t help anyone with the same problem. Something is wrong the integration platform (or at least my configuration). But the strange thing is that both were working for the last month or so. The only sensors which weren’t working were the ones from integration. Fortunately both devices already had a kwh attribute which I now used to replace those.
Here are the sensors with the problem anyway:
- platform: integration
source: sensor.contador_potencia_ativa_exportada
name: "Energia exportada kwh"
unit_prefix: k
round: 2
- platform: integration
source: sensor.yc600_pow
name: "YC600 produção kwh"
unit_prefix: k
round: 2
If you look around you will see many threads about issues with that integration. At this stage, as I understand it, there is no plan to modify how it works. You may have noticed that there is a configuration option for “method”. You might have better results if you use “left”
I just wonder why energy statistics sometimes become crazy without visible reasons - sensor’s consumed energy (state) doesn’t changed, but energy value (sum) make a huge jump :-o
While I’m waiting for my Iotawatt system to be delivered, I thought about trying to add some individual devices, like smart plugs etc. I’m not that familiar with YAML coding and can’t seem to find any resources or examples on what exactly needs to be added to the configuration.yaml file to get those devices to show up. I know that you have to define a sensor (I have both MQTT plugs and non-MQTT). There are thousands of examples on how to add the whole-house systems, but very little info on how to configure individual devices. What I have been able to find seems to have been posted before the Energy Monitor was added and doesn’t quite work with it or it is a partial example that also doesn’t work. Can anyone point me to something more definitive?
If the device was detected automatically or you have already added it then the POWER sensor should be there already. If not then this is the first step so you need to work out how to add the plug.
If you have the POWER sensor then look to see if your plug also provides an ENERGY sensor. It will have the unit of kWh or Wh. If there is no ENERGY sensor then you will have to create one using the Riemann Sum Integration. Integration - Riemann sum integral - Home Assistant
Look back through this thread and make sure your ENERGY sensor has the required attributes.
Once you have the ENERGY sensor correctly setup you will be able to add it to the energy dashboard by selecting it from the drop down list.
Is there a plan to visualize the water consumption with the energy monitor? The statistics par day with the possibility to look into the past is ingenious.