You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MealplanResponse parsing fails when recipe dateAdded is null #728
The Home Assistant Mealie integration crashes with an InvalidFieldValue exception
when fetching mealplans that contain recipes where dateAdded is null. This
completely breaks the integration's mealplan coordinator — no mealplan data is
returned at all.
Traceback
mashumaro.exceptions.InvalidFieldValue: Field "date_added" of type date in
BaseRecipe has invalid value None
mashumaro.exceptions.InvalidFieldValue: Field "recipe" of type Optional[BaseRecipe]
in Mealplan has invalid value {...}
mashumaro.exceptions.InvalidFieldValue: Field "items" of type list[Mealplan] in
MealplanResponse has invalid value [...]
Root Cause
BaseRecipe declares date_added as date, but the Mealie API legitimately
returns null for this field — for example on recipes imported via third-party
sync tools (e.g. kptncook). Since one affected recipe poisons the entire MealplanResponse, the whole mealplan fetch fails.
Expected Behavior
date_added should be typed as Optional[date] so that null values are
handled gracefully instead of crashing the entire response deserialization.
Thanks for reporting this, a fix has been made in the library and a PR for Home Assistant has been created, once merged it will be in a future release.
Activity
andrew-codechimp commentedon Apr 25, 2026
Thanks for reporting this, a fix has been made in the library and a PR for Home Assistant has been created, once merged it will be in a future release.