krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
449 stars 47 forks source link

Devices unavailable on 3.0.0 (key is set) #253

Closed boehser-enkel closed 1 year ago

boehser-enkel commented 1 year ago

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/meross_lan/init.py", line 523, in async_setup_entry device = api.build_device(device_id, entry) File "/config/custom_components/meross_lan/init.py", line 185, in build_device from .media_player import Mp3Mixin File "/config/custom_components/meross_lan/media_player.py", line 164, in LightMixin, MerossDevice if typing.TYPE_CHECKING else object NameError: name 'LightMixin' is not defined

krahabb commented 1 year ago

MMh...I really need to start automate testing :( I guess there's a declaration error now that you point at it... I'll test and patch right away

P.S. the patch is really simple if you want to not wait for the 'official' one: on line 164 in media_player.py remove the comma and 'MerossDevice' so it shows like: LightMixin if typing.TYPE_CHECKING else object

boehser-enkel commented 1 year ago

MMh...I really need to start automate testing :( I guess there's a declaration error now that you point at it... I'll test and patch right away

P.S. the patch is really simple if you want to not wait for the 'official' one: on line 164 in media_player.py remove the comma and 'MerossDevice' so it shows like: LightMixin if typing.TYPE_CHECKING else object

That did the job. Thank you