Home Assistant 2023.5 Broke Ecowitt

Home Assistant 2023.5 Broke Ecowitt
Ecowittt GW1000B

I'm a long-time weather enthusiast and I like having the awareness and insight that a hyper-local weather station brings. In this case, directly from my backyard. The recent update to Home Assistant 2023.5 broke the HACS Ecowitt integration that I had been using for years.

Ecowitt HACS Integration error 'unable to import component: cannot import name 'async_get_registry'

It turns out that there is now an "official" integration for Ecowitt and I hadn't, up to this point, needed to use it. In fact, until this issue, I didn't even know it existed. For those unfamiliar with HACS, it is a community repository of hundreds of custom components and integrations that can be added to Home Assistant. This is one of the things that makes Home Assistant so versatile.

I've seen two methods floating around in the forums to solve the above issue.

  1. Modify the init.py file and change line 21.

from:
async_get_registry as async_get_entity_registry,

to:
async_get as async_get_entity_registry,

2. Remove the HACS integration and install the official recommendation.

Depending on your skill level, option 1 might be trivial for you. However, I'm in favor of option 2 because it is a supported and official integration. The HACS integration might work with the line 21 fix but doesn't mean something else won't break later on. I also think, and I didn't really compare before removing the broken integration, that the official integration has a few more sensors exposed.

If you haven't upgraded to 2023.5 then I highly recommend that you remove the HACS Ecowitt integration first. If you have already upgraded, then you can follow what I did in this order.

Navigate to HACS and remove the Ecowitt integration. You will need to choose the "Ignore" option because the integration will still be installed in the Home Assistant integrations page.

Remove dialog for HACS Ecowitt integration highlighting the ignore option

After you have removed the integration from HACS, you need to reboot Home Assistant. After the system comes back up, you will need to delete the integration from the Home Assistant integrations page. I was unable to delete it until I rebooted first.

Delete Home Assistant Ecowitt Integration

After deleting the original integration, you can install the official Ecowitt integration.

Search for Ecowitt Integration

When you install this, you will get some information that is super important. Make sure you copy this down. This is the information that you will put into your Ecowitt's customized section and that is how the Ecowitt knows where to send the data.

Success page for Ecowitt integration installation along with vital information needed to configure the Ecowitt device

This is where things got tricky for me. I've been using Home Assistant for years and if you have watched any of my videos, you know I play around with all kinds of things. Somewhere along that path, I added SSL to my main configuration, thus forcing Home Assistant itself to terminate my SSL connection. I use Nginx Proxy to send traffic to Home Assistant so all of it worked fine...until the Ecowitt issue.

Ecowitt doesn't support sending data to SSL connections, so I had to figure out how to work around this. I will admit that the solution was simple but I probably spent a cumulative 2-3 hours trying every permutation of port, URL, and path I could think of.  

I had read that some had used Nginx Proxy with success to overcome the issue. That took me down the wrong path (and wasted more time) because I was sending the Ecowitt traffic to the proxy and then it was still being sent to HA on SSL because of how I had the proxy set up and, of course, the Ecowitt integration can't do SSL.

As noted above, the fix is simple. Disable SSL in the configuration.yaml file as I show here (and reboot HA).

SSL configuration in the http: stanza of Home Assistant configuration.yaml file

Since I connect to Home Assistant via the Nginx Proxy, all I had to do there was to change from HTTPS to HTTP scheme so all the other things that connect to HA via the proxy still work.

Selecting the HTTP scheme in the Nginx Proxy host config panel

After getting Home Assistant configured properly, I configured my Ecowitt to talk directly to Home Assistant on its IP address and port 8123.

Ecowitt GW1000 Customized Configuration screen

I'm not sure it is necessary, but I may have had to reboot the Ecowitt device after making changes. That could just be because I wasn't patient and thought it wasn't working. Doesn't hurt to do this every once in a while anyway.

Success looks like this.

Home Assistant Ecowitt integration showing 1 device and 26 entities.
Ecowitt integration device page showing all sensors

After you are successful, an optional step is to rename your entities from this new integration to what you were using before so that you don't have to individually update each dashboard/automation/etc.

Click the gear icon on an entity to get to its details
Rename the entity ID to what you want. The name can also be changed, but it defaults to what is in the entity ID.

I am now back up and running on an official integration. Had I not had the SSL complication, it would have taken me just a few minutes to do this. I hope this is helpful to others running into the same issue.

Don't forget to check out my videos on YT as well, where I have lots of Home Assistant related content--and subscribe while you are there!