openmotics / home-assistant

OpenMotics Home Assistant integration Beta
GNU Affero General Public License v3.0
15 stars 9 forks source link

[BUG] Updating to the latest version in HACS gives an import error #37

Closed kneirinck closed 9 months ago

kneirinck commented 1 year ago

Updating to the latest version through HACS is giving an import error because of an out of sync pyhaopenmotics. I fixed it by manually uninstall pyhaopenmotics and letting it redownload it. But I think the actual fix would be to bump pyhaopenmotics to 0.0.3 and point to that version. I haven't had time yet to verify that or create PRs but just wanted to report in case anyone encounters this issue.

tmds commented 1 year ago

I fixed it by manually uninstall pyhaopenmotics and letting it redownload it.

@kneirinck what are the steps to do this?

woutercoppens commented 1 year ago

‘ha core rebuild’ will also do the job.

kneirinck commented 1 year ago

I fixed it by manually uninstall pyhaopenmotics and letting it redownload it.

@kneirinck what are the steps to do this?

IIRC run pip uninstall pyhaopenmotics on your HA docker instance or HAOS and then restart HA

tmds commented 1 year ago

I run hass in a container.

I tried the ha command but it wasn't available.

The pip uninstall didn't work for me either: it didn't find the package. Maybe I was running it in the wrong folder.

I found the pyhaopenmotics directory and overwrote it with https://github.com/openmotics/pyhaopenmotics/tree/main/src/pyhaopenmotics. Not the cleanest way to go about it... but it's up and running again now.

I ran into this issue by doing an upgrade through hacs. Will it also occur on a fresh install?

What needs to happen to solve this?

kneirinck commented 1 year ago

this should now be solved