herikw / home-assistant-custom-components

Atag One Custom components for Home-Assistant
GNU General Public License v3.0
11 stars 5 forks source link

Integrations need to be in their own folder. Change sensor/atagone.py to atagone/sensor.py. This will stop working soon. #9

Closed RezzZ closed 5 years ago

RezzZ commented 5 years ago

with the installation of HA 0.89.1 I get the following warning in HA. I think this component need a minor adjustment?

Integrations need to be in their own folder. Change sensor/atagone.py to atagone/sensor.py. This will stop working soon.

Only thing I miss in the HA documentation is what to do after I move this sensor file to a separate folder. My configuration.yaml should then point to this new folder somehow?

edit: it is actually not working any more in 0.89.1. I can't control the component any more. I reverted back to 0.87.0 for now

j360b commented 5 years ago

For climate custom_component I did the following:

  1. create folder /config/custom_components/atagone
  2. create file climate.py
  3. copy atagone.py code in climate.py
  4. replace the following lines old

    from homeassistant.components.climate import (ClimateDevice, PLATFORM_SCHEMA, SUPPORT_TARGET_TEMPERATURE, SUPPORT_OPERATION_MODE) from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_PORT, TEMP_CELSIUS, ATTR_TEMPERATURE)

new

from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA from homeassistant.components.climate.const import ( STATE_COOL, STATE_ECO, STATE_HEAT, STATE_AUTO, SUPPORT_OPERATION_MODE, SUPPORT_TARGET_TEMPERATURE, STATE_MANUAL)`

QkulleQ commented 5 years ago

Hi @j360bi, I did the steps you described, but unfortunately they didn't work for me. Clicking: atagone-log Gives this: atagone-errorlog

Hope you can see what's wrong

herikw commented 5 years ago

The following line should not be removed from the original source: _from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_PORT, TEMP_CELSIUS, ATTRTEMPERATURE) Otherwise you are missing some HA constants.

Btw, you can grab the new version. All changes are incorporated.

j360b commented 5 years ago

True, my bad. In my version the line mentioned by @herikw was not removed.. Good that there is a new version! Tnx

QkulleQ commented 5 years ago

No problem @j360b ! And thanks for the new version @herikw !

RezzZ commented 5 years ago

just upgraded the atagone and HA to 0..90.2 and all works again. Thanks @herikw