RobertD502 / home-assistant-flair

Custom component for Home Assistant Core for Flair pucks, vents, rooms, structures, and minisplits
MIT License
87 stars 12 forks source link

Flair integration no longer being loaded #56

Closed bfenty closed 1 year ago

bfenty commented 1 year ago

after updating my Homeassistant installation, the flair integration appears to have broken. I'm getting the following error in my homeassistant logs upon restart:

2023-05-17 01:34:55.864 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration flair: Unable to import component: No module named 'flairaio'

In the UI, it just says 'not loaded' and all my vents show offline.

HA version: Home Assistant 2023.5.3 Frontend 20230503.3 - latest

RobertD502 commented 1 year ago

How are you running Home Assistant? Docker, OS in a VM, etc.

Also, what version of the Flair integration?

flairaio is the backend library that Home Assistant needs to download. That error is indicating that Home Assistant didn't download the library.

Edit: I see from another issue you had raised ~a year ago, you're running it as a docker container on Ubuntu.

I'd navigate inside of the running container and go to /usr/local/lib/python3.10/site-packages/ (if I remember the exact path correctly) and see if flairaio exists there. If not, then that'll require investigating further and seeing if your docker container is having problems reaching the pypi servers or some other cause.

The integration itself doesn't handle installation of flairaio. Home Assistant is told via the manifest file what requirements to grab from pypi and then it is up to Home Assistant to handle downloading them. If you don't end up finding the cause, you can manually fix it by entering your container and issuing a pip install flairaio command. After that is done, restart home assistant and the integration should be back up and running.

bfenty commented 1 year ago

Ok. I saw some errors related to Python separately and didn't mention them, didn't realize they're important. I do believe the docker image has some issues and I may have to revert, thank you for the response. I'll update here once I know more.

bfenty commented 1 year ago

resolving the issue with python seems to have resolved the issue with the integration. I also updated to using the HACS install method to keep my integration current.

Thank you for a great integration and your help!