Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'NoneType' object is not iterable #13

Open
thundergreen opened this issue Nov 20, 2019 · 11 comments
Open

TypeError: 'NoneType' object is not iterable #13

thundergreen opened this issue Nov 20, 2019 · 11 comments

Comments

@thundergreen
Copy link

Hi Fellllaaa :)

Thanks again to keep this component up to date. I now get this error message in my logs

I cannot control the heater anymore. I am running latest homeassistant dev version 0.1.02.3 with cozytouch gateway

2019-11-20 21:32:52 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.downstairs_radiateur fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 270, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/cozytouch/climate.py", line 197, in update
    self.heater.update()
  File "/usr/local/lib/python3.7/site-packages/cozypy/objects.py", line 391, in update
    sensor.update()
  File "/usr/local/lib/python3.7/site-packages/cozypy/objects.py", line 390, in update
    for sensor in self.sensors:
TypeError: 'NoneType' object is not iterable
@biker91620
Copy link
Owner

Can you update cozypy library.
It should be fixed :)

@thundergreen
Copy link
Author

Hey mate.. unfortunately this issue / error persists . I just tried to increase the temperature. Another thing: I get a fan mode which is obsolete for the heater. Is it somehow possible to "remove" unneeded options for the climate component?

I installed version 1.1.1 cozypy .

@thundergreen
Copy link
Author

@biker91620 Sorry to bother but the component is still not working. Are you still on it?

@Oniric75
Copy link

HEllo,
i upgrade ha to the lastest upgrade yesterday, got issues with multiple plugin but managed to repair most of them expect for cozytouch (that i like a lot for my radiator!)

i have the exact same issue: first cozypi was missing, i upgrade ha-cozytouch plugin manually then added cozypi into the container. it repaired part of the issue : it start now but this morning i notice the error
2019-11-29 08:04:53 INFO (SyncWorker_3) [custom_components.cozytouch.climate] Update thermostat Chambre Ami Radiateur 2019-11-29 08:04:53 INFO (SyncWorker_4) [custom_components.cozytouch.switch] Update switch Chambre Gabrielle Radiateur 2019-11-29 08:04:53 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.chambre_ami_radiateur fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 270, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/cozytouch/climate.py", line 201, in update self.heater.update() File "/usr/local/lib/python3.7/site-packages/cozypy/objects.py", line 391, in update sensor.update() File "/usr/local/lib/python3.7/site-packages/cozypy/objects.py", line 390, in update for sensor in self.sensors: TypeError: 'NoneType' object is not iterable
but it seems that the presence detector inside the radiator are still ok, only the climate seems to fail.

thanks for your great jobs ! are you thinking of pushing your addon to hacs one day ? would be great to not have to make upgrade manually anymore !

@Oniric75
Copy link

btw if I can help to test, just ask for it :)

i tried to make cozypy work on standalone with your examples files and it works
the issue seems to be somewhere else, but no clue how to find it. it seems to be through hass update calls ...

to make the examples works i had to change the example a little bite:

clientId = os.environ['COZYTOUCH_CLIENT_ID']
clientPassword = os.environ['COZYTOUCH_CLIENT_PASSWORD']

by

clientId = 'COZYTOUCH_CLIENT_ID'
clientPassword = 'COZYTOUCH_CLIENT_PASSWORD'

@Oniric75
Copy link

Oniric75 commented Dec 3, 2019

@biker91620 @thundergreen
i don't know if you received it too but apparently there will be a major update of the cozytouch... let's hope it wont break the api.
@thundergreen do you still have the issue too ? or did you find a fix ? i'm kinda stuck, i will try this weekend to set HA in debug mode and attach visual code to the cozytouch plugin and hope i will have a lead.
if by any chance i found out something i will of course keep you inform

@thundergreen
Copy link
Author

@Oniric75 unfortunately I did not find a fix yet. It just is broke. maybe @biker91620 could give a statement? And yessss there will be a major update.. got the email today. We hope the best. The only chance is to shutdown the cozytouch for the time the update is programmed :) But i will risk the update as this component is not a MUST HAVE but a nice gimick :)

@Oniric75
Copy link

issue seems to have fixed itself ! or @biker91620 made a update i didnt see, i upgrade to 0.103.2 and re install cozytouch plugin and i got values again !

@Oniric75
Copy link

and ... it came back ... that's so weird ... i will try to find some time to set hass in debug mode to understand what is happening. @biker91620 some help would be so much appreciate ! if you have a tipee or something like that i would be happy to participate to it

@Oniric75
Copy link

this patch fix the issue: https://github.com/biker91620/cozypy/pull/4
@biker91620 could you merge this pull request on cozypy ?

@Oniric75
Copy link

@thundergreen patch this above request into your local repo and everything work find again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants