krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
416 stars 45 forks source link

Error after upgrading to 2021.8.0 #52

Closed Ameglialuna closed 3 years ago

Ameglialuna commented 3 years ago

After upgrading to the 2021.08 version I have these errors in the log:

ERROR (MainThread) [homeassistant.setup] Setup failed for meross_lan: Unable to import component: cannot import name 'ELECTRICAL_CURRENT_AMPERE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration meross_lan: cannot import name 'ELECTRICAL_CURRENT_AMPERE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

and the component doesn't work anymore

Dio55 commented 3 years ago

After upgrading to the 2021.08 version I have these errors in the log:

ERROR (MainThread) [homeassistant.setup] Setup failed for meross_lan: Unable to import component: cannot import name 'ELECTRICAL_CURRENT_AMPERE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration meross_lan: cannot import name 'ELECTRICAL_CURRENT_AMPERE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

and the component doesn't work anymore

Same problem here ...

drako86 commented 3 years ago

same problem whit my HA config

larod241 commented 3 years ago

Same Here after 2021.08

BeyondPixels commented 3 years ago

Yep, same here after updating to HA OS 6.2 / core-2021.8.0

SamboyCoding commented 3 years ago

From what I can see these have changed as follows in 2021.8: ELECTRICAL_CURRENT_AMPERE -> ELECTRIC_CURRENT_AMPERE VOLT -> ELECTRIC_POTENTIAL_VOLT

Making these changes in my local copy of meross_entity.py (two occurrences of each) fixed it.

Ameglialuna commented 3 years ago

From what I can see these have changed as follows in 2021.8: ELECTRICAL_CURRENT_AMPERE -> ELECTRIC_CURRENT_AMPERE VOLT -> ELECTRIC_POTENTIAL_VOLT

Making these changes in my local copy of meross_entity.py (two occurrences of each) fixed it.

Yes, I made the changes you suggest and now it works again. Thanks SamboyCoding for the workaround!

larod241 commented 3 years ago

From what I can see these have changed as follows in 2021.8: ELECTRICAL_CURRENT_AMPERE -> ELECTRIC_CURRENT_AMPERE VOLT -> ELECTRIC_POTENTIAL_VOLT

Making these changes in my local copy of meross_entity.py (two occurrences of each) fixed it.

Thks, it's work again after your suggest changes

drako86 commented 3 years ago

From what I can see these have changed as follows in 2021.8: ELECTRICAL_CURRENT_AMPERE -> ELECTRIC_CURRENT_AMPERE VOLT -> ELECTRIC_POTENTIAL_VOLT

Making these changes in my local copy of meross_entity.py (two occurrences of each) fixed it.

Thk it’s work again for me ^^

krahabb commented 3 years ago

Hello everybody, Thank you for signaling and already 'fixing' this awful issue with core update. I'm aware of this since this afternoon and I'm sorry I can't fix it rightaway. I'll patch it likely tomorrow with some other queued minor features. Thank you!

Keltere commented 3 years ago

Made a pull request with the fix https://github.com/krahabb/meross_lan/pull/53