eseglem / hass-wattbox

Home Assistant WattBox Component
MIT License
14 stars 8 forks source link

Component not working with HA 0.115.0b #3

Closed jes1417 closed 3 years ago

jes1417 commented 4 years ago

Component is not working with HA on the newest beta. System upgraded but threw a lot of errors during startup and eventually started with this error.

Log Details (ERROR)

Logger: homeassistant.setup
Source: setup.py:138
First occurred: 7:46:14 PM (1 occurrences)
Last logged: 7:46:14 PM

Setup failed for wattbox: Unable to import component: cannot import name 'UNIT_PERCENTAGE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

The server also won't restart now as the config checker is throwing an error. I am going to have to remove the repo from hacs to get my system to start up properly.

Chorty commented 4 years ago

See commit https://github.com/eseglem/hass-wattbox/commit/4b273e65617585d0d50a537871350796a6a9c1ce this will resolve the issue. UNIT_PERCENTAGE was change in const.py and init.py to PERCENTAGE. I have not programmed in a while but this was as simple as they get.

jes1417 commented 4 years ago

I downloaded the init.py and const.py file, placed them in the custom_component folder, rebooted HA then uncommented my config but it won't pass configuration validation.

jes1417 commented 4 years ago

Ok So I did end up getting this to work with these two files in place, my problem was I had rolled back to 0.114 and the changes didn't work with that version of HA after upgrading again to the latest beta the component started working.

Chorty commented 4 years ago

I was just about to ask if you were still on 115 glad to see you it worked for you.

eseglem commented 4 years ago

Broke because of https://github.com/home-assistant/core/pull/39383 and https://github.com/eseglem/hass-wattbox/pull/4 should fix it.