Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bluesheep opened this issue Jul 3, 2024 · 9 comments · Fixed by #90
Closed

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

bluesheep opened this issue Jul 3, 2024 · 9 comments · Fixed by #90

Comments

@bluesheep
Copy link

Hardware and versions

HA 2024.07.0
Proxmox VM

  • Inverter model & generation: N/A
  • Inverter firmware version:
  • Battery firmware version:
  • Home Assistant integration version:

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
Copy link
Author

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

@cdpuk
Copy link
Owner

cdpuk commented Jul 3, 2024

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 added a commit to bluesheep/givenergy-local that referenced this issue Jul 3, 2024
bluesheep added a commit to bluesheep/givenergy-local that referenced this issue Jul 3, 2024
@bluesheep
Copy link
Author

bluesheep commented Jul 3, 2024

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
Copy link

russdan commented Jul 4, 2024

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
Copy link

ianfretwell commented Jul 4, 2024

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
Copy link

poolski commented Jul 5, 2024

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
Copy link

poolski commented Jul 5, 2024

@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

@cdpuk
Copy link
Owner

cdpuk commented Jul 9, 2024

Strategic fix now merged in #90:

  • Removed pin to a specific pydantic version. HA core pins this in package_constraints.txt, so we can't fight it. The new approach should work from 2023.10 onwards, or at least until the HA pin moves to pydantic 2 onwards.
  • Removed other dependencies that were only included in commented out debug code within givenergy_modbus.

@russdan
Copy link

russdan commented Jul 10, 2024

Awesome, thanks @cdpuk 👍 Looking forward to the next HA release to test it out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants