cyberjunky / home-assistant-custom-components

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

Toon climate and smartmeter not working since 0.89 #23

Closed pdwonline closed 5 years ago

pdwonline commented 5 years ago

Since HA 0.89, Toon came with the following error:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 124, in _async_setup_platform
    task = async_create_setup_task()
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 89, in async_create_setup_task
    None, platform.setup_platform, hass, platform_config,
AttributeError: module 'homeassistant.components.toon.climate' has no attribute 'setup_platform'

I have already placed the python script in a folder named 'toon and renamed the .py files to climate.py and sensor.py for release 0.88

cyberjunky commented 5 years ago

Update your components from repo. They should be fixed. If you use the google assistant version, I will fix this later today.

pdwonline commented 5 years ago

Thanks! I updated them and the smartmeter is working again! However, the Toon climate component is not (same error)

cyberjunky commented 5 years ago

Do you use the google assistant one? (from issue #13) or the default one from toon repo directory? The last one should work.

cyberjunky commented 5 years ago

I have put the google assistant one in toon_google directory. Still have to fix switching modes and manual. Will try to look into this today.

pdwonline commented 5 years ago

I used the default climate component from the toon repo directory and placed it in the folder 'custom_components/toon' but it doesn work. still getting this error:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 124, in _async_setup_platform
    task = async_create_setup_task()
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 89, in async_create_setup_task
    None, platform.setup_platform, hass, platform_config,
AttributeError: module 'homeassistant.components.toon.climate' has no attribute 'setup_platform'

Up to 0.88 it worked fine

pdwonline commented 5 years ago

Probably it has something to do with this change: https://github.com/home-assistant/home-assistant/pull/21070 Does it mean I have to include a climate component also in the same folder? (and where do I get that component?)

cyberjunky commented 5 years ago

Did you look at the repo, read the README.md file and looked into the toon and/or toon_google directory?

You can find the climate.py file inside it (which is simply the old toon.py file) and a empty __init__.py file, both need to be copied (like the README described) to your toon dir, and you must remove the old toon.py file.

I use them with 0.89.1 without issues.

pdwonline commented 5 years ago

You'te right, i missed the init.py file! Thank You!