Error in Ecowitt component

Hello,

anyone else found this after upgrade to 0.115.x?
Component ecowitt cannot import name 'UNIT_PERCENTAGE' from 'homeassistant.const'

My config (snippet):

ecowitt:
  port: 4199
  barounit: metric
  windunit: metric
  rainunit: metric
  windchillunit: hybrid

Any ideas what i am doing wrong?

Thanks, Ralf

EDIT: just found this seems to be a bug:

Hopefully it gets fixed soon. I do not get any updates from my weather station :frowning:

Following.

@cnschulz, @Ralf - See the comment on this pull request from @frenck.

I will add a pull request to the Ecowitt integration, and let’s hope that @garbled1 will add it.

UPDATE: I’ve created a pull request for it,

Confirm fixing the units gets it working again. There were a couple of extra kph units I fixed in my init.py config.

     TYPE_WINDSPEEDKMH: ("Wind Speed", SPEED_KILOMETERS_PER_HOUR,
                         TYPE_SENSOR, None, "mdi:weather-windy", S_METRIC),
     TYPE_WINDGUSTKMH: ("Wind Gust", SPEED_KILOMETERS_PER_HOUR,
                        TYPE_SENSOR, None, "mdi:weather-windy", S_METRIC),
     TYPE_WINDSPEEDMPH: ("Wind Speed", SPEED_MILES_PER_HOUR,
                         TYPE_SENSOR, None, "mdi:weather-windy", S_IMPERIAL),
     TYPE_WINDGUSTMPH: ("Wind Gust", SPEED_MILES_PER_HOUR,
                        TYPE_SENSOR, None, "mdi:weather-windy", S_IMPERIAL),
     TYPE_MAXDAILYGUST: ("Max Daily Wind Gust", SPEED_MILES_PER_HOUR,
                         TYPE_SENSOR, None, "mdi:weather-windy", S_IMPERIAL),
     TYPE_MAXDAILYGUSTKMH: ("Max Daily Wind Gust", SPEED_KILOMETERS_PER_HOUR,
                            TYPE_SENSOR, None, "mdi:weather-windy", S_METRIC),

I’ve added that as well to the pull request, but no reply yet.

Apologies if I am hijacking. However, I just noticed this thread and I thought I would mention a project along this line as well. As shown, it will wait for a Ecowitt device to send data and publish it via MQTT topic. I have been using it with much success this weekend and have ran it both as a docker container and via supervisord on my HA install.

My start into this was a GW1000 device that I wanted to pull into HA locally rather than use any cloud service.

Again, please forgive me if I have sidetracked any conversation.

Hi all,
I have not managed to get my Ecowitt integration working. I have fixed up the UNIT_PERCENTAGE code however now my log states this:
Logger: homeassistant.config
Source: config.py:413
First occurred: 8:44:32 PM (1 occurrences)
Last logged: 8:44:32 PM

'Invalid config for [ecowitt]: expected a dictionary for dictionary value @ data[‘ecowitt’]. Got [OrderedDict([(‘port’, 4199)]), OrderedDict([(‘barounit’, ‘metric’)]), OrderedDict([(‘windunit’, ‘metric’)]), OrderedDict([(‘rainunit’, ‘metric’)]), OrderedDict([(‘windchillunit’, ‘hybrid’)])]. (See /config/configuration.yaml, line 87). Please check the docs at https://www.home-assistant.io/integrations/ecowitt

When I follow the link I get a 404 Page not Found error.
Sorry, I’m a noob at this, so slowly learning how it all hangs together. Any advice appreciated

@Alx1772, you can grab the fixed one from here:

https://github.com/GSzabados/homeassistant_ecowitt/tree/patch-1/custom_components/ecowitt

And check your configuration.yaml is it correct?

1 Like

So the PR has been merged to the master and should be available as 0.3.1 through HACS.