Add Cookidoo planned meals calendar#159456
Conversation
|
Hey there @miaucl, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
Documentation PR - not sure how to link it so the check recognizes it. |
Link it in the PR description 🙂 |
|
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? |
|
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. |
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
| """Initialize the entity.""" | ||
| super().__init__(coordinator) | ||
| assert coordinator.config_entry.unique_id | ||
| self._attr_unique_id = f"{coordinator.config_entry.unique_id}_meal_plan" |
There was a problem hiding this comment.
if we expect more calendar entities, we can keep the meal_plan suffix, otherwise, unique ids are unique per platform per integration
There was a problem hiding this comment.
Removed _meal_plan suffix
| @property | ||
| def event(self) -> CalendarEvent | None: | ||
| """Return the next upcoming event.""" | ||
| return None |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Returned next event
|
@surfingbytes Can you please open a PR for the docs? |
Breaking change
Proposed change
This adds calendar entity to cookidoo, which contains planned meals,
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: