Energy Dashboard with data from Smart Meter Texas

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 your configuration.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 in homeassistant 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.

2 Likes

So I haven’t had any luck with this configuration.

Background: I am using the “updated” home assistant integration for Smart Meter Texas (SMT). See integration pics/files below. Any recommendations on tweaks I can make to get this integration show up in my Energy Dashboard under “energy consumed”?

PS: I followed all of your steps and added my SMT entity to the sensors_utility_smt.yaml with no luck.

I’m not able to get this working either. I also used the “updated” version of the Smart Meter Texas integration, which is now working and doesn’t need the pysmtreader setup. I’m able to see my total kWh like this:
image

And have added everything to yaml like your post suggested, but my sensors aren’t showing any data. I’ll keep playing around with it but so far it doesn’t seem like this works.

image

Quick question - but are your utility_smt_hourly and _daily sensors showing actual data?

I don’t think it’s directly supported on the energy dashboard yet. There is pull request to add at least one missing part - not sure if that will solve it completely. You can watch (but please don’t comment) https://github.com/home-assistant/core/pull/55665 to see if it gets pulled into a dot release, or if it waits until next month.

I’ve got mine working now: https://smarthomepursuits.com/energy-dashboard-with-data-from-smart-meter-texas/ It’s been running well for the last week or so.

image

image
image

1 Like

Check your sensors names registered in homeassistant. Your customize_glob may need to be adjusted to reflect your correct sensor names.

What/where is the update SMT integration? The stock one is still suffering from the “Failed to connect” bug.

Long story short:

Someone figured out the reliable way to access the data via the “unofficial API” and it was fixed some number of months ago. But then 3 weeks ago, some configuration changes on the hosting side (Akamai, i.e. not under Home Assistant’s control) have resulted in it not working again.

You can watch/subscribe to the discussions here to get notified if it gets fixed, but PLEASE don’t post/comment there unless you have specific technical ideas/solutions.

Ok, yeah that’s the thread I’ve been following. The way it was written in the September comments led me to think there was some other version of the integration.

Looks like we just have to sit tight and hope SMT get’s their act together. I do have the NodeRed method working. But I’m not sure if the native Energy dashboard is taking the inputs from it in a way that makes sense.