Fix Office 365 calendars to be compatible with rfc5545 #144230
Merged
+157
−19
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
Add a small module to replace invalid Office 365
TZID
values with something that is valid rfc5545 content and will be parsable by the underlying library. This moves the calendar parsing code to a module shared by config flow and coordinator and uses an integration specific exception rather than the exceptions in the underlying library to prepare for adding more validations/error checking.Context: RFC5545 requires a calendar to be fully specified. Any
TZID
must be referenced inVTIMEZONE
. This will remove the invalid timezone and force the date entry to be in the local time (given the behavior is undefined this seems most reasonable).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: