Add new Mealie meal plan types to calendar and services#158987
Merged
joostlek merged 3 commits intoDec 15, 2025
Conversation
Contributor
|
Hey there @joostlek, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Merged
8 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for three new meal plan types (dessert, drink, snack) introduced in Mealie 3.7, while maintaining backward compatibility with earlier versions. The implementation includes version checking to conditionally create calendar entities and validate service calls based on the Mealie server version.
Key Changes
- Version-based validation ensures new meal plan types are only used with Mealie 3.7+
- Calendar entities are dynamically created based on server version
- Service calls validate meal plan types against the server version
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/mealie/__init__.py |
Passes version information to runtime_data for use in other components |
homeassistant/components/mealie/coordinator.py |
Adds version field to MealieData dataclass |
homeassistant/components/mealie/calendar.py |
Conditionally creates calendar entities based on Mealie version |
homeassistant/components/mealie/services.py |
Adds validation function to check meal plan types against version |
homeassistant/components/mealie/services.yaml |
Adds new meal plan type options (dessert, snack, drink) to service definitions |
homeassistant/components/mealie/strings.json |
Adds translations for new meal plan types and validation error message |
tests/components/mealie/test_calendar.py |
Adds test for legacy calendar behavior on Mealie < 3.7 |
tests/components/mealie/test_services.py |
Adds parametrized tests for version-based service validation |
tests/components/mealie/fixtures/about.json |
Updates default test version to v3.7.0 |
tests/components/mealie/snapshots/*.ambr |
Updates test snapshots for new entities and version |
joostlek
approved these changes
Dec 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Mealie 3.7 introduced new meal plan types. This PR adds support for these with backward compatibility with older versions.
Calendar - checks the Mealie version and only creates calendar entities supported by the version.
Services - Adds the meal plan types to the two services that add meals, with a version check and a service validation error being raised if trying to use the new meal plan types with older versions.
Mealie has nightly versions, which are un-versioned, we already have a warning that nightly is not supported and assume that they are running the latest version if this is the case.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: