cdpuk / givenergy-local

Home Assistant integration for local access to GivEnergy inverter and battery systems
MIT License
47 stars 14 forks source link

Update to HA 2024.07 Creates failure to load due to updated pedantic package #87

Open bluesheep opened 3 days ago

bluesheep commented 3 days ago

Hardware and versions

HA 2024.07.0 Proxmox VM

Describe the bug

Custom component fails to start due to error loading.

Setup failed for custom integration 'givenergy_local': Requirements for givenergy_local not found: ['pydantic==1.10.15']

Debug log

N/A

bluesheep commented 3 days ago

See This chore (Sorry, I'm new to Github)

cdpuk commented 3 days ago

Thanks for the report. Following that earlier issue with upgrades to HA 2024.6, this has been on the list of things to sort out properly. I'm a bit short on time until next week but I welcome anyone else having a go at a tactical fix again.

bluesheep commented 3 days ago

I have submitted a PR that I think addresses it, at least tactically. I was using the GH web UI so apologies if the structure of my PR is weird.

russdan commented 3 days ago

Needs to bump to 1.10.17 now

What's the long term fix needed to avoid this? Just bumping pydantic versions in manifest.json and requirements.txt can't be the strategic fix? I'm happy to have a stab at a proper fix, but not sure what needs doing! Or do we just remove specific versions from these files, essentially getting 'latest'?

ianfretwell commented 3 days ago

EDIT OK, found I just need to edit the manifest.json file to get it working.

Can someone just advise where I actually find the requirements.txt file in order to edit it - searching my homeassistant persistent folder comes up blank - whereas the custom_components is obvious.

Thanks.

poolski commented 1 day ago

Can someone just advise where I actually find the requirements.txt file in order to edit it - searching my homeassistant persistent folder comes up blank - whereas the custom_components is obvious.

The requirements.txt is a module dependency: it's for the project maintainers to update - manifest.json is the only file you need to worry about.

poolski commented 1 day ago

@cdpuk I'm not sure if this is related, but I'm getting issues where the integration fetches data from the inverter at boot time and publishes it to MQTT once and then it's crickets.

I'm not sure yet if it's an MQTT problem (I'm using EMQX rather than Mosquitto in HA), but none of my MQTT settings have changed, so I'm finding it a bit odd.

Happy to provide more info if I can get some idea of where to look/what to investigate. 🤔

Update

So it seems like the MQTT entities are updating correctly. If I look in the MQTT integration, it has all of the correct values which are being published by GivTCP, but the Givenergy Local integration doesn't seem to be updating its sensors from there! 🤯

MQTT Device image

GivEnergy Local PixelSnap 2024-07-05 at 11 34 45@2x

After reloading the integration PixelSnap 2024-07-05 at 11 36 58@2x