New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add import calendar events endpoint #116314
base: dev
Are you sure you want to change the base?
Add import calendar events endpoint #116314
Conversation
…mport-calendar-events-endpoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @raulcodes
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @allenporter, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Thank you for your contribution to this feature! I think users will appreciate the ability to upload/import .ics files. My impression is that the desired behavior for something like this when discussed before would be to create a new calendar with the .ics content, which is typically how this works in the web calendars i've seen. I think doing this through a config flow would be pretty cool, then creating a new calendar with the uploaded events. |
@allenporter But If you would like to stick with creating a calendar on upload, I can rework this! |
I get your point that it would work more generally. If you want to add new API methods to the Calendar Entity model, then it deserves an architecture discussion. For some reason my intution is that uploading a new .ics file would be the way to go (or also support pulling from a url) -- not sure why. Perhaps its just because in google calendar it already supports import so it feels like something specific to the downstream calendar provider... I don't think i have a super string justification. Aside: I think folks have been in favor of a calendar export that works across all calendars, e.g. give you an |
I think that you made a good point in your original comment about using a config flow. I opened a smaller PR that should set me up to rework this with a config flow. I understand your intuition. I think adding this as an optional step of the create calendar config flow would be useful as well and that can be the direction I take here. As for a calendar export, I would be interested in getting to that as well. I think I found the PR you mentioned. |
Awesome, happy to help review both. |
Proposed change
This PR, along with a frontend PR, adds the ability to import an iCalendar file and add its events to an existing local calendar.
Feature was requested here.
This PR adds an http view at
/api/calendars/import
with a POST action that accepts a payload:and attempts to add the events of the ics file to the pre-existing calendar with given
entity_id
.Type of change
Additional information
Corresponding frontend PR
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
..coveragerc
.To help with the load of incoming pull requests: