asantaga / wiserHomeAssistantPlatform

Platform and related climate/sensors to support the Drayton Wiser Home Heating System
MIT License
235 stars 44 forks source link

None Exception when there are no smartplugs #71

Closed asantaga closed 4 years ago

asantaga commented 4 years ago

from https://community.home-assistant.io/t/drayton-wiser-home-assistant-integration/80965/53

Duke_box Mike 2h Hi Angelo,

I have re-installed twice now as Fulch suggested but still do not have the switch. I have an error:

Mon Feb 24 2020 12:59:14 GMT+0000 (Greenwich Mean Time) Error while setting up wiser platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/wiser/switch.py", line 45, in async_setup_platform WiserSmartPlug(hass, data, plug.get("id"), plug.get("Name")) for plug in data.wiserhub.getSmartPlugs() TypeError: 'NoneType' object is not iterable

Any help appreciated. Thanks

scooper1 commented 4 years ago

Did you setup  plug in the wiser app and assign it to a room 

Sent from Yahoo Mail on Android

On Mon, 24 Feb 2020 at 15:21, Angelo Santagatanotifications@github.com wrote:
from https://community.home-assistant.io/t/drayton-wiser-home-assistant-integration/80965/53

Duke_box Mike 2h Hi Angelo,

I have re-installed twice now as Fulch suggested but still do not have the switch. I have an error:

Mon Feb 24 2020 12:59:14 GMT+0000 (Greenwich Mean Time) Error while setting up wiser platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/wiser/switch.py", line 45, in async_setup_platform WiserSmartPlug(hass, data, plug.get("id"), plug.get("Name")) for plug in data.wiserhub.getSmartPlugs() TypeError: 'NoneType' object is not iterable

Any help appreciated. Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

asantaga commented 4 years ago

Fixed in dev branch, just waiting to hear that it works. The code "assumed" you had smartplugs which was .. an assumption :-)

edit

Got confirmation that the code change in dev fixed the issue.. Just waiting to see if there are any other issues before re-releasing it

asantaga commented 4 years ago

fixed and released in R1.9.1

djashjones commented 4 years ago

I still get this error using R1.9.1

asantaga commented 4 years ago

@djashjones

Hey I just checked the code on github and master does have the fix so this must be another error..

Can you try. deinstalling (removing the wiser directory from custom_components) and then reinstalling? Providing you dont remove the setup from the configuration.yaml you wont loose anything...

Let me know

Reopening this issue till we resolve this

djashjones commented 4 years ago

That fixed it. Also my away button came back and a few more services are available now. You can close it again, sorry.

What caused the issue when upgrading?

asantaga commented 4 years ago

No idea.. Ive seen it sometimes that the HACS upgrade process doesnt work properly... No idea, it might be my amateurish management of the git releases its based on .. not sure..

glad its fixed, for a while I thought Id have to release another version (1.9.2), which just screams DAMM Angelo test test test test :-)

thanks for letting me know