Skip to content

Add Cookidoo planned meals calendar#159456

Merged
joostlek merged 6 commits into
home-assistant:devfrom
surfingbytes:feat/cookidoo-calendar
Dec 29, 2025
Merged

Add Cookidoo planned meals calendar#159456
joostlek merged 6 commits into
home-assistant:devfrom
surfingbytes:feat/cookidoo-calendar

Conversation

@surfingbytes
Copy link
Copy Markdown
Contributor

@surfingbytes surfingbytes commented Dec 19, 2025

Breaking change

Proposed change

This adds calendar entity to cookidoo, which contains planned meals,

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @miaucl, mind taking a look at this pull request as it has been labeled with an integration (cookidoo) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of cookidoo can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign cookidoo Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@surfingbytes
Copy link
Copy Markdown
Contributor Author

Documentation PR - not sure how to link it so the check recognizes it.

@jpbede
Copy link
Copy Markdown
Member

jpbede commented Dec 19, 2025

home-assistant/home-assistant.io#42653 - not sure how to link it so the check recognizes it.

Link it in the PR description 🙂

@surfingbytes
Copy link
Copy Markdown
Contributor Author

Well that's the silly thing. You code the stuff, send it in and go to open PR. The Core PR has a checkbox for you to confim you already updated documentation. So you open new tab, go to docs site, update it, and open PR for that. But that one wants the link to the Core one? Like, how? You have 2 tabs with 2 PR descriptions open, and you clearly have to submit one first, but both wants the link to the other one?

@jpbede
Copy link
Copy Markdown
Member

jpbede commented Dec 19, 2025

Yes, the chicken-and-egg problem 🙂 It's no problem to submit them without links at first. Once you have both ready, you can edit the PR description and link them.

Comment thread homeassistant/components/cookidoo/calendar.py Outdated
@home-assistant
Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@surfingbytes surfingbytes marked this pull request as ready for review December 21, 2025 10:04
@home-assistant home-assistant Bot requested a review from joostlek December 21, 2025 10:04
"""Initialize the entity."""
super().__init__(coordinator)
assert coordinator.config_entry.unique_id
self._attr_unique_id = f"{coordinator.config_entry.unique_id}_meal_plan"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we expect more calendar entities, we can keep the meal_plan suffix, otherwise, unique ids are unique per platform per integration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed _meal_plan suffix

Comment on lines +46 to +49
@property
def event(self) -> CalendarEvent | None:
"""Return the next upcoming event."""
return None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we return the next one? In theory we can add this to the coordinator to get all the meals for this week, and return the next one of this week

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returned next event

@home-assistant home-assistant Bot marked this pull request as draft December 23, 2025 15:10
@surfingbytes surfingbytes marked this pull request as ready for review December 28, 2025 16:14
@home-assistant home-assistant Bot requested a review from joostlek December 28, 2025 16:14
@joostlek joostlek changed the title Added Cookidoo planned meals calendar Add Cookidoo planned meals calendar Dec 29, 2025
@joostlek joostlek merged commit 183bc31 into home-assistant:dev Dec 29, 2025
36 checks passed
@joostlek
Copy link
Copy Markdown
Member

@surfingbytes Can you please open a PR for the docs?

@surfingbytes
Copy link
Copy Markdown
Contributor Author

Docs PR

@surfingbytes surfingbytes deleted the feat/cookidoo-calendar branch December 29, 2025 13:06
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: Extend Cookidoo Integration in Home Assistant

3 participants