cyberjunky / home-assistant-custom-components

My custom components for Home Assistant
MIT License
70 stars 19 forks source link

Toon not working in version 0.88 #19

Closed zuidwijk closed 5 years ago

zuidwijk commented 5 years ago

Updated from 0.87.0 to 0.88.0 and now Toon isn't working anymore:

2019-02-21 17:10:53 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform toon
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/toon/climate.py", line 21, in setup_platform
    add_entities([ThermostatDevice(hass)], True)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/toon/climate.py", line 31, in __init__
    self.thermos = hass.data[toon_main.TOON_HANDLE]
KeyError: 'toon_handle'
Jeltel commented 5 years ago

Same here :(

RudolfRendier commented 5 years ago

It seems to be loading the default component in 'components/toon/' and is complaining about its toon_handle:

https://github.com/home-assistant/home-assistant/blob/127c55e0c196dc6ffd321c1ad28b533f636faf79/homeassistant/components/toon/__init__.py#L25

https://github.com/home-assistant/home-assistant/blob/127c55e0c196dc6ffd321c1ad28b533f636faf79/homeassistant/components/toon/climate.py#L31

Maybe a name conflict resulting in loading the incorrect component?

About 20 days ago the structure for the original component changed: https://github.com/home-assistant/home-assistant/commit/e2d3c27e8515d6bce546382a79c717891bcb5905#diff-91fb2a3ec4c7c63a413b56d3239c3da6

cyberjunky commented 5 years ago

Can you create directory custom_components/toon/ and move custom_components/climate/toon.py into it and rename it to climate.py That seems to work here.

Jeltel commented 5 years ago

@cyberjunky That works.

Strange, because for the boilerstatus component the exact suggestion was given in the log. But not for the climate component.

cyberjunky commented 5 years ago

I think it's a bug in home assistant. I need to update all custom_components readme's

zuidwijk commented 5 years ago

I'll try it out tonight :+1:

joostvanmourik commented 5 years ago

Can you create directory custom_components/toon/ and move custom_components/climate/toon.py into it and rename it to climate.py That seems to work here.

That seems to do the trick. Thanx (also does the trick with the Google Assistant enabled version)

rickvnl commented 5 years ago

Can you create directory custom_components/toon/ and move custom_components/climate/toon.py into it and rename it to climate.py That seems to work here.

That seems to do the trick. Thanx (also does the trick with the Google Assistant enabled version)

Hi, what version are you talking about? I'm asking because I can't control my rooted Toon with GA.

cyberjunky commented 5 years ago

@rickvnl in the Google Assistant issue I posted a sort of working version https://github.com/cyberjunky/home-assistant-custom-components/files/2683932/toon.zip

It has issues setting manual temp, and getting back to modes I understood, it needs some work.

zuidwijk commented 5 years ago

Can you create directory custom_components/toon/ and move custom_components/climate/toon.py into it and rename it to climate.py That seems to work here.

Confirmed, it worked for me too!

rudyo85 commented 5 years ago

Can you create directory custom_components/toon/ and move custom_components/climate/toon.py into it and rename it to climate.py That seems to work here.

Worked for me too. Thx!