Integrating DTE Electric Rates into Your Home Assistant Energy Dashboard

One of Home Assistant’s powerful features is the Energy Dashboard, a tool designed to help monitor and manage your home energy usage. But what if you could take it a step further and integrate electric rates from your utility provider, such as DTE Energy, into your Energy Dashboard? This blog post will guide you through the process of using a custom template to achieve just that.

Home Assistant Energy Dashboard Home Assistant Energy Dashboard

Adding a Custom Template Sensor(s)

The first step is to create a custom template sensor in Home Assistant that contains the current electric rate(s) from DTE Energy.

Copy the rate(s) that you are using from the GitHub repo into your home assistant configuration.yaml file into the template section (create it if it doesn’t exist).

template:
  - sensor:
      - name: "D1.2 Inflow"
      ...

As of writing this post, the D1.2 (inflow and outflow) and D1.7 (inflow) are included. Pull requests are more than welcome to add more.

Integrating the Custom Sensor into the Energy Dashboard

Once the custom sensor is set up, the next step is to integrate it into the Energy Dashboard. This can be done by going to Settings > Energy > Manage Dashboards > Energy > Electricity grid > Grid consumption. There you can add or edit entry and set it up to use the custom sensor you created to track the price. See the screenshot below as an example.

Home Assistant Energy Dashboard Grid Consumption Configuration showing use an entity with current price with the D1.2 Inflow entity selected

This will add the current DTE Energy rate to your Energy Dashboard, allowing you to see the current rate alongside your energy usage data. Below you can see a screenshot that shows the cost of the usage for my grid usage.

Home Assistant Energy Dashboard showing the cost based on the current DTE Energy rate

I am using Sense to track my energy usage, so the Yearly Usage - Main is the total energy usage for my home for the main meter. The reason for using the yearly entities, is that they only rolls over once a year, however the numbers in this screenshot are for a specific day. I also have a geothermal meter in order to take advantage of the discounted rate for geothermal heating and cooling.

Next Steps

I hope you found this information useful. I am planning on writing some more posts regarding:

  • Using TP-Link Kasa smart plugs to track energy usage for individual devices in my home
  • Using ESPHome and ESPSense with CT clamps to track energy usage for individual circuits in my geothermal electric panel
  • Using Home Assistant to track my solar production and energy usage
  • Using Data from AquaHawk to track water usage
Andy Blyler
Andy Blyler
Chief Data Architect

Andy grew up in central Pennsylvania on his family’s fruit farm. It was here that he found his passion for tinkering and stumbled upon the world of electronics. Now he builds large cloud-based software solutions and is always willing to do whatever it takes to make them successful.