Using dashboards in Grafana is a great way to visualize your energy consumption and allows you to do in-depth analysis to get insights in how you consumed energy in your house.
But, with version 0.87 of Home Assistant, it is now easier than ever to keep track of your energy used so far today (or this hour, week, month, etc), thanks to the ‘Utility meter’ component created by Diogo Gomes (@dgomes on the forums). It is a great way to provide immediate insight and increase awareness on your energy consumption. Let’s set it up, it is pretty easy.
Provided you already have connected your utility meter to Home Assistant, this component will track a sensor that provides an accumulating meter reading and calculate how much it has gone up over a specified period of time. That period is either hourly, daily, weekly, monthly or yearly. It also provides a way to distinguish between different tariffs (for example peak and off-peak) and switch automatically to the right tariff through an automation. But I found the example in the documentation did not work for a utility meter that provides separate sensors for each tariff such as the DSMR component I am using.
No problem though, just setup an instance of the utility meter component for each sensor.
For example: I am on a plan that utilizes two tariffs for electricity (peak and off-peak) and one for gas consumption. Through the DSMR component, I have three separate sensors:
- sensor.power_consumption_low for off-peak electricity consumption
- sensor.power_consumption_normal for peak electricity consumption
- sensor.gas_consumption for, you guessed it, gas consumption 🙂
The utility meter automatically switches between different tariffs, so an automation to do so, is not necessary. Instead setup different instances of the utility_meter component, like this (in this case tracking daily and monthly consumption):
Keep in mind that the first cycles are incomplete. That means that when you activate this component in your configuration, the first cycles it counters (daily and monthly in the example above) are incomplete, unless you activate them on the first of a month at exactly midnight. The values it tracks are persistent though, so a restart of home assistant will not reset the counters back to 0.
Thank you for creating this component, Diogo Gomes! It is a great step to getting a short feedback loop and better insights into our personal energy consumption.