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 config flow to CalDAV #103215
Add config flow to CalDAV #103215
Conversation
if self._supports_offset: | ||
self._attr_extra_state_attributes = { | ||
"offset_reached": is_offset_reached( | ||
self._event.start_datetime_local, self.coordinator.offset |
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.
Are we going to deprecate the is_offset_reached
for the legacy entities or deprecate the legacy entities? If so, I think this is ok, but otherwise our standard nowadays is to set the state attribute to None
when we don't know it for the entity.
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.
Yeah I would generally like to make it go away slowly, given its weird and hacky and triggers should be the new way to handle this. My thought was to no longer support it from the UI but preserve it for existing yaml users. We could technically support it here since its just pulled from the titles of the calendars.
I was thinking this needed to be announced when making yaml go away, but perhaps i need to start shifting the docs since I kind of punted on what to do about existing yaml for now, assuming it will be possible to deprecate in the future. (I think we may need a better solution for search still like a calendar helper to fully make it go away)
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.
We probably need to at least say in the docs if it's not supported when setting up the integration from the UI.
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.
Thanks, i've added a documentation PR (which was missing in the first place) and have addressed this.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Tested and working as expected 👍 |
Proposed change
Configure caldav from the UI. This is part of a larger series of PRs to prepare caldav to support other platforms (todo).
Error handling was determined based on manual testing of various problems and the client library error codes for various conditions (invalid urls, invalid passwords, invalid hostnames, etc).
Updates test fixtures, moving them to conftest for use during config flow and init tests.
Type of change
Additional information
Checklist
black --fast 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: