-
Notifications
You must be signed in to change notification settings - Fork 50
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
All sensors unavailable; validation error for ProductDetailsResponse #281
Comments
From my research, it seems that this is due to the breaking changes to the Grocy API in v4.0. Not sure if the fix will here or in pygrocy, but from what I understood it has to do with changes to the quantity units. |
I successfully reverted and restored my Grocy install back to v3.3.2 and can confirm the integration is working again. |
The issue seems to be with pygrocy and the breaking changes in the Grocy API. I got it working again by changing the 'requirements' in 'manifest.json' from The above is a branch of pygrocy removing the offending issues. |
That's great! I didn't realize I could cherry pick my branch to fix it in the interim... Seems like a good fix until it gets merged into the master for pygrocy. |
Either edit the requirements or opt into the experimental releases. I did the latter and it all seems to work as well although I did have to (re)enable all sensors which seemed to have been disabled. Not sure if that was my own doing though. |
I was using the Grocy custom component v4.10.0 (enable beta in HACS) which uses the pygrocy v1.5.0 library and it was not working for me and still displayed the error I posted above. |
Have you tried the fix I mentioned above, editing the 'requirements' in 'manifest.json'? I am running the same versions as you and this fixed the problem. |
The way it breaks down is as follows:
I already submitted a pull request to pygrocy so I think it's a waiting game until that gets updated and then subsequently updating the requirement here so that the fix carries over. |
This question most closely matched my problem, but the solution must have changed. I have Grocy add on ver 4.0.3 and my manifest.json references pygrocy 2.0. I changed it to the code above -"git+https://github.com/fedefreue/pygrocy.git@develop#pygrocy" - and restarted HA (of course) but all sensors remain unavailable in the integration. What am I doing wrong? - because it always ends up being that LOL. If it helps, I had Grocy integration installed before and deleted it because of this same problem. The add on has been reliable (so far) |
I'm running the latest stable version for both the HA add-on and for Grocy and am not experiencing this - could be due to something different? Want to share your logs - I can take a look |
Not sure if this is the log info you need. I got it after enabling "debug logging" in the integration: Logger: custom_components.grocy.coordinator Error fetching grocy data: Update failed: 2 validation errors for ProductDetailsResponse quantity_unit_stock -> name_plural none is not an allowed value (type=type_error.none.not_allowed) default_quantity_unit_purchase -> name_plural none is not an allowed value (type=type_error.none.not_allowed) I changed log level in the yaml for the add on to debug and get: Add-on: Grocy
|
From what I can see above, it seems it's failing when updating the add-on? What's challenging is I can't reproduce (and am also on the latest for both) |
@Caddyman68 I appreciate finding the apparently single other person in the world with the same niche problem as me! Found a solution that fixed it for me, and might help you -- update I found SebRut/pygrocy#272 in 2.1.0, looks like one of the last changes in pygrocy before being archived was fixing exactly this. Edit: PR up #311 |
Unless all relevant information is provided, I can't help you
Describe the bug
Sensors show as unavailable
Expected behavior
Sensors to be available with data
To Reproduce
update to latest HA and Grocy custom component
General information to help debugging:
all sensors are enabled but unavailable.
What is your installed versions of Home Assistant, Grocy and this integration?
HA Container 2023.8.0
Grocy custom component integration v4.10.0
Grocy installed in docker container from Linuxserver.io v4.0.0-ls205
How do you have Grocy installed? Add-on or external?
external container
Have you added debugging to the log, and what does the log say?
HA log shows this error:
JSON service data (if related to using a service)
Additional context
The text was updated successfully, but these errors were encountered: