cyberjunky / home-assistant-custom-components

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

Home Assistant 0.89.0 breaks component #20

Closed lxz81 closed 5 years ago

lxz81 commented 5 years ago

I am not familiar with checking out/in, but to get the component working in HASS 0.89.0, I had to change/add something in the climate.py file.

I changed the imports to the following:

from homeassistant.components.climate import (ClimateDevice, PLATFORM_SCHEMA)
from homeassistant.components.climate.const import (SUPPORT_TARGET_TEMPERATURE, SUPPORT_OPERATION_MODE)
wwolkers commented 5 years ago

just created a pull request for this.

gerritjonker commented 5 years ago

Did you use the new custom component structure? Including __init__.py in every sensor directory? I also had these errors because HA was using the standard Toon component. The __init__.py is used to tell HA to use the custom component.

lxz81 commented 5 years ago

Yes, that was part of the problem. But pull request #21 fixed the imports. Now it is working again

zuidwijk commented 5 years ago

Whats exactly in the init.py ? I can't find it yet...

edit: nevermind!

I guess I had to remove the pychache folder ;-)

zuidwijk commented 5 years ago

An empty file called **init**.py is all there is. See Ron's commit 77b1cb9 (Mar 07, 2019)

I've placed an empty init.py file and removed the pycache folder and that worked! Great job/fix again!