vilppuvuorinen / hass-melcloud

MIT License
13 stars 1 forks source link

Testing experience #3

Open bwduncan opened 1 year ago

bwduncan commented 1 year ago

Hi,

I installed this and it failed to start:

Jan 04 00:47:41 raspberrypi hass[26315]: 2023-01-04 00:47:41.449 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration melcloudexp: cannot import name 'HTTP_FORBIDDEN' from 'homeassistant.const' (/srv/homeassistant/lib/python3.9/site-packages/homeassistant/const.py)

If I remove those imports and change the names to the numeric constants (401 and 403) then the integration loads and finds my ATW device!

I needed up update the manifest.json to use pymelcloud==2.11.0, and then it sees my ATW device is in heat-flow mode and adds a climate device for me!

That's very cool. Or should I say hot lol

:smile:

Bruce

marc-romu commented 1 year ago

I had the same problem. I removed the HTTP_FORBIDDEN and the HTTP_UNAUTHORIZED from here:

from homeassistant.const import (
    CONF_PASSWORD,
    CONF_TOKEN,
    CONF_USERNAME,
)

And I changed this line:

            if err.status == HTTP_UNAUTHORIZED or err.status == HTTP_FORBIDDEN:

by this other one:

            if err.status == 401 or err.status == 403:

Now the config_flow works fine, and I can control the flow temperature 🙌

rotnar commented 1 year ago

Hello i changed this but my installation dont recognice my ecodan ATW system :(

Can you help me?