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

Validation error after upgrade to 2025.1 #320

Closed
ebolly opened this issue Jan 5, 2025 · 10 comments · Fixed by #323
Closed

Validation error after upgrade to 2025.1 #320

ebolly opened this issue Jan 5, 2025 · 10 comments · Fixed by #323

Comments

@ebolly
Copy link

ebolly commented Jan 5, 2025

Unless all relevant information is provided, I can't help you

Describe the bug
After updating Grocy integration to 2025.1 something is wrong with my data.

_Error fetching grocy data: Update failed: 1 validation error for ChoreDetailsResponse chore.userfields Field required [type=missing, input_value={'id': 6, 'name': 'Nettoy...igned_to_user_id': None}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing
**Expected behavior**
A clear and concise description of what you expected to happen._

Seems that ID 6 in my tasks is incorrect, but nothing has changed and I can't find the 6 one (where is this ID ?). All Tasks are assigned to 1 one user (myself) or to a specific user called "En commun". This is used to split display on HA.

To Reproduce
Steps to reproduce the behavior:

  1. Start Grocy Integration
  2. See error

General information to help debugging:

What sensors do you have enabled? Are they working and/or what state are they in? Do you have the corresponding functions enabled in Grocy?
Chores, Overdue Chores and Tasks. All are unavailable

What is your installed versions of Home Assistant, Grocy and this integration?

Add-on: Grocy
ERP beyond your fridge! A groceries & household management solution for your home

Add-on version: 0.23.0
You are running the latest version of this add-on.
System: Home Assistant OS 14.1 (amd64 / qemux86-64)
Home Assistant Core: 2025.1.0
Home Assistant Supervisor: 2024.12.3

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?

-----------------------------------------------------------
 Add-on: Grocy
 ERP beyond your fridge! A groceries & household management solution for your home
-----------------------------------------------------------
 Add-on version: 0.23.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.1  (amd64 / qemux86-64)
 Home Assistant Core: 2025.1.0
 Home Assistant Supervisor: 2024.12.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to ERROR
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-php-fpm: starting
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-grocy: starting
patching file views/layout/default.blade.php
s6-rc: info: service init-grocy successfully started
s6-rc: info: service init-php-fpm successfully started
s6-rc: info: service php-fpm: starting
s6-rc: info: service php-fpm successfully started
s6-rc: info: service init-nginx successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started

JSON service data (if related to using a service)

{

}

Additional context
Add any other context about the problem here.

@RalphDepondt
Copy link

You're waiting for this PR to be merged: flipper/pygrocy2#2

@ke5jzm
Copy link

ke5jzm commented Jan 8, 2025

Same issue and on HA 2025.1.1

@ke5jzm
Copy link

ke5jzm commented Jan 8, 2025

Rollling back to HA 12.5, or deleting chores in 2025.1.1 fixes issue. Have rolled back to 12.5 until fix can be found.

@Tmatz27
Copy link

Tmatz27 commented Jan 8, 2025

what do you mean deleting chores in 2025.1.1? deleting them from where?
I tried rolling back HA to 12.5 but I have other cards that were updated for the recent HA Core and it ended up causing a bunch of other issues as well.

@ke5jzm
Copy link

ke5jzm commented Jan 8, 2025

Going into Grocy itself and delete chores in the list.

@wallbasher
Copy link

wallbasher commented Jan 9, 2025

I tried a few things outside of deleted/re-adding chores without any luck.
Re-Saving Chore without changes
Re-Saving Chore setting Assignment type to None
Removing Assigned to then Saving Chore
Adding a Userfield on Chores
Specify UserField on Chore Save
Removing a Userfield on Chores

I was hoping there is some type of schema change that can be performed based on the comment about Deleting/Readding

After each of these steps I would check the integration using reload, same error as above:
This error originated from a custom integration.

Logger: custom_components.grocy.coordinator
Source: helpers/update_coordinator.py:411
integration: Grocy (documentation, issues)
First occurred: January 7, 2025 at 3:21:13 PM (6 occurrences)
Last logged: 9:08:04 PM

Error fetching grocy data: Update failed: 1 validation error for ChoreDetailsResponse chore.userfields Field required [type=missing, input_value={'id': 1, 'name': 'Brevec...igned_to_user_id': None}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/missing

Snip from /chores API Call:
[ { "id": 1, "chore_id": 1, "chore_name": "Brevecto", "last_tracked_time": "2025-01-05 00:00:00", "next_estimated_execution_time": "2025-04-01 23:59:59", "track_date_only": 1, "next_execution_assigned_to_user_id": 1, "is_rescheduled": 0, "is_reassigned": 0, "next_execution_assigned_user": { "id": 1, "username": "admin", "first_name": "First", "last_name": "Last", "row_created_timestamp": "2024-01-21 04:53:36", "display_name": "First Last", "picture_file_name": "n4njx61efmkc42634m9hdecepticon1copy.png" } } ]

@Tmatz27
Copy link

Tmatz27 commented Jan 9, 2025

I've tried the same. I guess I'll try the delete chores and readd but so far none of the steps I've tried have helped either.

@daveedwards123
Copy link

daveedwards123 commented Jan 9, 2025

I am having the same issue and i have tracked it to this grocy/grocy#1484 and more specifically grocy/grocy#1994
Seems like this is not implemented in the grocy api for the chores api, but the userfields are returning on the generic /objects/chores api.
Note sure if someone can route this components' chores api calls to /objects/chores ???

@tttopuz
Copy link

tttopuz commented Jan 9, 2025

I am having the same issue here.

@daveedwards123
Copy link

Confirmed working after upgrading to the new version, thanks @Jakobu5

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.

7 participants