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

entities are unavailable since update #290

Open
collateral87 opened this issue Sep 14, 2023 · 19 comments
Open

entities are unavailable since update #290

collateral87 opened this issue Sep 14, 2023 · 19 comments

Comments

@collateral87
Copy link

Describe the bug
I have updated to Grocy 4.0.3 via Grocy Add-on 0.20.0 and since than, all my entities in this integration are unavailable. The integration itself is loading and the logs are clean.

Expected behavior
Entities are unavailable

To Reproduce
Updated to Grocy 4.0.3 via Grocy Addon 0.20.0

What is your installed versions of Home Assistant, Grocy and this integration?
Homeassistant: 2023.9.2
Grocy: 4.0.3
Integration: 4.11.1

How do you have Grocy installed? Add-on or external?
Add-on

Have you added debugging to the log, and what does the log say?

grafik

@grzech1983
Copy link

On my end logs show error:

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)

@excalbian
Copy link

In my case the error was similar, but different:
Error fetching grocy data: Update failed: 1 validation error for BatteryDetailsResponse battery -> description none is not an allowed value (type=type_error.none.not_allowed). I looked, and the one test battery I have defined doesn't have a description, so I set one and the integration loaded correctly 👍.

What I'm not sure of is where there is a disconnect. Why is there validation asserting that the description (and other fields) can't be none when Grocy is allowing those values not to be set?

@shbatm
Copy link

shbatm commented Sep 16, 2023

I have a similar error:

Error fetching grocy data: Update failed: 1 validation error for BatteryDetailsResponse battery -> used_in none is not an allowed value (type=type_error.none.not_allowed)

@XingLii
Copy link

XingLii commented Sep 18, 2023

Probably one aswell since update - similar to shbatm but for MealPlanSectionResponse;
ERROR (MainThread) [custom_components.grocy.coordinator] Error fetching grocy data: Update failed: 1 validation error for MealPlanSectionResponse name none is not an allowed value (type=type_error.none.not_allowed)

@trunks403
Copy link

I have the same problem after i update to Grocy Addon 0.20.0, Does anybody if its possible to downgrade addon ?

@saya6k
Copy link

saya6k commented Sep 20, 2023

I have the same problem after i update to Grocy Addon 0.20.0, Does anybody if its possible to downgrade addon ?

I did downgrade to version 0.19.1, and now custom components works fine.

@trunks403
Copy link

@saya6k, can you please explain to me how to downgrade many thanks

@saya6k
Copy link

saya6k commented Sep 20, 2023

@saya6k, can you please explain to me how to downgrade many thanks

Settings > System > Backups

I restored with partial backup named 'addon_a0d7b954_grocy_0.19.1'. If you did partial backup while upgrade, you can find this.

@trunks403
Copy link

trunks403 commented Sep 20, 2023

Thanks, ! That worked !

@collateral87
Copy link
Author

Any news on this issue?
Does this regards every 0.20.0 addon Installation and is there a fix except of downgrading?

(Thank you for this nice and helpful integration)

@Brouwertje
Copy link

I fixed it by creating a section first. (name it food by example) When you create your mealplan, also add the created section to the meal for that day and the mealplan card works.

You can create a section at mealplan > Configure sections (top right)

@collateral87
Copy link
Author

Thank you for your help. My log says 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 have no idea how can i fix this.

@sudoxnym
Copy link

sudoxnym commented Oct 19, 2023

Hello,
I am having a similar issue. I'm in the process of getting the logger going right now, but on my install I was able to narrow down the issue. Try disabling Meal Plan again (default state). After about 30-45 seconds it reloads and everything else works. Will update with logs asap.

Edit: I have the config set up for logger. I am unsure of where to go to view these logs though.

@larsmartinx
Copy link

Hello, I am having a similar issue. I'm in the process of getting the logger going right now, but on my install I was able to narrow down the issue. Try disabling Meal Plan again (default state). After about 30-45 seconds it reloads and everything else works. Will update with logs asap.

Edit: I have the config set up for logger. I am unsure of where to go to view these logs though.

When you say "disable Meal plan", how do you do this? I can't see any "Meal plan" in the Add-on configuration. I just installed the latest version as my first install a few days ago, and the only entity I get is update.grocy_update

@karwosts
Copy link
Contributor

and the only entity I get is update.grocy_update

IIRC most of the entities are disabled by default, do you have any sensors you can enable on the integration page?

@sudoxnym
Copy link

image

This is where I am disabling it after enabling it. When you first install the integration all of the sensors are disabled.

@larsmartinx
Copy link

Hmm, there might be more things confusing me here. My add-on works (i can open the web UI in the Sidebar, I can add chores and recipes etc), but when installing the integration I'm asked for a URL, API key and port number. The API key I can find from the Grocy add-on, but what url and port do you use when it's running in a Home Assistant add-on? I thought running Grocy as an add-on with the Ingress thing removed the need for url and port in the config (sorry for mixing this question into the open issue case)

@BottlecapDave
Copy link

I just came across this issue too. I was also getting the error name_plural none is not an allowed value. The cause was that I had some quantity units that didn't have the Name in plural form field set. Once I set these, the integration started working again.

@saschaludwig
Copy link

I just came across this issue too. I was also getting the error name_plural none is not an allowed value. The cause was that I had some quantity units that didn't have the Name in plural form field set. Once I set these, the integration started working again.

I can confirm that! I also had quantities without plural form and that will break the integration.

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

No branches or pull requests