Describe the bug
Meal plan data is not showing in Home Assistant, all sensors are set to unavailable.
Expected behavior
I would expect meal plan data to be imported into home assistant.
General information to help debugging:
All sensors enabled, all are currently unavailable despite API activity.
What is your installed versions of Home Assistant, Grocy and this integration?
HA Core: 2023.12.4
HA Supervisor: 2023.12.0
Grocy: 4.0.3
Integration: 4.11.1
How do you have Grocy installed? Add-on or external?
External
Have you added debugging to the log, and what does the log say?
2023-12-31 19:53:01.245 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)
Additional info
I can see successful API requests and data is coming back
2023-12-31 19:53:01.198 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] --> GET /objects/meal_plan
2023-12-31 19:53:01.198 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] <-- 200 for /objects/meal_plan
2023-12-31 19:53:01.198 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] b'[{"id":3,"day":"2023-12-31","type":"recipe","recipe_id":2,"recipe_servings":2,"note":null,"product_id":null,"product_amount":0,"product_qu_id":null,"row_created_timestamp":"2023-12-31 19:28:31","done":0,"section_id":-1},{"id":4,"day":"2024-01-05","type":"recipe","recipe_id":2,"recipe_servings":2,"note":null,"product_id":null,"product_amount":0,"product_qu_id":null,"row_created_timestamp":"2023-12-31 19:31:12","done":0,"section_id":-1}]'
2023-12-31 19:53:01.216 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] --> GET /objects/recipes/2
2023-12-31 19:53:01.216 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] <-- 200 for /objects/recipes/2
2023-12-31 19:53:01.216 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] b'{"id":2,"name":"Thai Green Curry","description":"
1) Pound green curry paste and Thai basil leaves for an extra vibrant colour<br \/>2) Get the paste as fine as possible<br \/>3) Reduce the coconut milk until very thick<br \/>4) Add the curry paste to a separate pan and saute for a few minutes<br \/>5) Add the chicken thigh to the curry paste pan and toss chicken for a minute<br \/>6) Add the coconut milk, chicken stock and makrut lime leaves, wait one minute<br \/>7) Add the fish sauce and palm sugar<br \/>8) Simmer for 10-15 minutes until the chicken is fork tender<br \/>9) Add bamboo shoots and cook for a minute until the curry comes back to a boil, then add the thai basil<br \/>10) Serve with jasmine rice<\/p>","row_created_timestamp":"2023-12-31 19:17:53","picture_file_name":"0zg92onxmy1vsfqk336hwigreen-curry-new-sq-2.jpg","base_servings":1,"desired_servings":2,"not_check_shoppinglist":0,"type":"normal","product_id":null,"userfields":null}'
2023-12-31 19:53:01.226 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] --> GET /objects/meal_plan_sections?query%5B%5D=id%3D-1
2023-12-31 19:53:01.226 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] <-- 200 for /objects/meal_plan_sections?query%5B%5D=id%3D-1
2023-12-31 19:53:01.226 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] b'[{"id":-1,"name":null,"sort_number":-1,"row_created_timestamp":"2023-12-31 19:08:22","time_info":null}]'
Describe the bug Meal plan data is not showing in Home Assistant, all sensors are set to unavailable.
Expected behavior I would expect meal plan data to be imported into home assistant.
General information to help debugging:
All sensors enabled, all are currently unavailable despite API activity.
What is your installed versions of Home Assistant, Grocy and this integration? HA Core: 2023.12.4 HA Supervisor: 2023.12.0 Grocy: 4.0.3 Integration: 4.11.1
How do you have Grocy installed? Add-on or external? External
Have you added debugging to the log, and what does the log say? 2023-12-31 19:53:01.245 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)
Additional info I can see successful API requests and data is coming back
2023-12-31 19:53:01.198 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] --> GET /objects/meal_plan 2023-12-31 19:53:01.198 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] <-- 200 for /objects/meal_plan 2023-12-31 19:53:01.198 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] b'[{"id":3,"day":"2023-12-31","type":"recipe","recipe_id":2,"recipe_servings":2,"note":null,"product_id":null,"product_amount":0,"product_qu_id":null,"row_created_timestamp":"2023-12-31 19:28:31","done":0,"section_id":-1},{"id":4,"day":"2024-01-05","type":"recipe","recipe_id":2,"recipe_servings":2,"note":null,"product_id":null,"product_amount":0,"product_qu_id":null,"row_created_timestamp":"2023-12-31 19:31:12","done":0,"section_id":-1}]' 2023-12-31 19:53:01.216 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] --> GET /objects/recipes/2 2023-12-31 19:53:01.216 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] <-- 200 for /objects/recipes/2 2023-12-31 19:53:01.216 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] b'{"id":2,"name":"Thai Green Curry","description":"
1) Pound green curry paste and Thai basil leaves for an extra vibrant colour<br \/>2) Get the paste as fine as possible<br \/>3) Reduce the coconut milk until very thick<br \/>4) Add the curry paste to a separate pan and saute for a few minutes<br \/>5) Add the chicken thigh to the curry paste pan and toss chicken for a minute<br \/>6) Add the coconut milk, chicken stock and makrut lime leaves, wait one minute<br \/>7) Add the fish sauce and palm sugar<br \/>8) Simmer for 10-15 minutes until the chicken is fork tender<br \/>9) Add bamboo shoots and cook for a minute until the curry comes back to a boil, then add the thai basil<br \/>10) Serve with jasmine rice<\/p>","row_created_timestamp":"2023-12-31 19:17:53","picture_file_name":"0zg92onxmy1vsfqk336hwigreen-curry-new-sq-2.jpg","base_servings":1,"desired_servings":2,"not_check_shoppinglist":0,"type":"normal","product_id":null,"userfields":null}' 2023-12-31 19:53:01.226 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] --> GET /objects/meal_plan_sections?query%5B%5D=id%3D-1 2023-12-31 19:53:01.226 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] <-- 200 for /objects/meal_plan_sections?query%5B%5D=id%3D-1 2023-12-31 19:53:01.226 DEBUG (SyncWorker_4) [pygrocy.grocy_api_client] b'[{"id":-1,"name":null,"sort_number":-1,"row_created_timestamp":"2023-12-31 19:08:22","time_info":null}]'