My electric usage data comes from Smart Meter Texas, so getting the new energy dashboard to populate took a bit of trial and error for me, and I’ve seen some posts where people are having the same issue, so this is an attempt to clarify some of this stuff. I went from getting no data, so getting negative values, but I think I finally have this working half descent to where it is actually usable.
I usually dont have enough time to jack too much with this, so this is by no means the prettiest, or most complete guide. Feel free to comment on improvements or any issues that may need further clarification.
To start off, i’m working with a core installation, so if you’re not comfortable with editing your yaml files, please dont let me waste your time. This will probably not help you. If you’re OK with editing yaml, let’s begin.
Assumptions:
- This will assume you already have an energy dashboard, enabled by adding
energy:
to yourconfiguration.yaml
unless you are using the default config (I am not) - You already have the SmartMeterTexas integration installed in some shape or form. I use
pysmtreader
but there are several ways to do this. I wont get into how to set that up here, but rather how to process the data you already have inhomeassistant
to show up in the energy dashboard.
Edit your configuration.yaml
and add
utility_meter: !include sensors_utility_smt.yaml
Create the file named contents of sensors_utility_smt.yaml
in the same directory as your configuration.yaml
# Utility Meter sensors
utility_smt_hourly:
source: sensor.smt_electricreading
# ^^ Replace sensor ^^ with your sensor showing the cumulative current reading.
# ^^ This should be increasing every time you get a reading.
cycle: hourly
utility_smt_daily:
source: sensor.smt_electricreading
# ^^ Again, replace ^ with your cummulative sensor here
cycle: daily
## Add more for weekly, monthly, yearly if desired
In my case I also had to add some customization to some sensors to make them available to the energy dashboard. You may or may not need this in your configuration.yaml
homeassistant:
customize_glob:
sensor.smt_*:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
unit_of_measurement: kWh
Again, i’m sure there are better ways to do this, and you may need to find the right sensor names on your install, but this is what got me what I needed.
After this, click the Check Configuration button under server controls and if it passes, restart your homeasistant. After restart, you should be able to select the sensors you listed in sensors_utility_smt.yaml
to populate energy dashboard.
It will take some time (seen references to 2 hours somewhere) for the data to show up.
Even with all this, as all SMT users should know, SMT is mediocre at best, but if you’re (like me) too lazy to buy and or install an actual CT meter, this is all you got.
My SMT has never been really consistent, especially on the hourly reports, so I capture an hourly/daily/weekly/monthly calculation via automation, because if you miss a reading or you get a failed response at the regular intervals, you’re more likely to capture that on the next reading, so it makes sense to calculate your daily / weekly / monthly totals also.