* Bump caldav to 1.3.8
1.3.8 fixes a bug where duplicate STATUS properties would be emitted for a single VTODO depending on the case of the arguments used.
That bug meant that even though that is the intended API usage, passing lowercase for the status argument name would be rejected by caldav servers checking conformance with the spec which forbids duplicate STATUS.
This in turn prevented HomeAssistant to add new items to a caldav todo list.
Bump the requirements to 1.3.8 to repair that feature
* Update global requirements
* refactor: return date/datetime for due date
* fix: explicitly set due date on vTODO component
Using `set_due` automatically handles converting the Python-native
date/datetime values to the correct representation required by RFC5545.
* fix: fix tests with changed due date handling
* fix: item.due may not be a str
* refactor: keep local timezone of due datetime
* refactor: reorder import statement
To make ruff happy.
* fix: fix false-positive mypy error
* Add Caldav todo enttiy for VTODO components
* Use new shared apis for todos
* Update homeassistant/components/caldav/todo.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update todo item conversion checks
* Iterate over results once
* Add 15 minute poll interval for caldav todo
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix CalDAV supported components check when configured from the UI
* Move async_get_calendars to a seprate file
* Simplify return value for async_get_calendars
* Initial caldav config flow with broken calendar platform
* Set up calendar entities
* Remove separate caldav entity
* Update tests after merge
* Readbility improvements
* Address lint issues
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add checking for duplicate configuration entries
* Use verify SSL as input into caldav and simplify test setup
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use keyword arguments when constructing `WebDavCalendarData`
* Use keyword arguments when constructing `WebDavCalendarEntity`
* Remove random newlines
* Introduce data class to hold calendar event data
* Rename CalendarEventDevice to CalendarEntity
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix docstring on google calendar api conversion function.
* Update todoist to new calendar enttiy api, tested manually
* Add back old API for a legacy compatibility layer
* Add deprecation warning for old calendar APIs
* Fix deprecation warning
* Fix merge for missing summary #69520
* Add mypy typing for newly introduced classes
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Simplify the calendar offset calculations to no longer update the event dictionary
using extra fields. calculate_offset is renamed to extract_offset and the integration
is responsible for overwriting the summary text.
This is in prepration for:
- Improved calendar event typing, removing unnecessary offset_reached field
- Calendar triggers which will remove offsets anyway
* Use f-strings in integrations starting with B
* Use f-strings in integrations starting with C
* Use f-strings in integrations starting with D
* Use f-strings in integrations starting with E
* Fix pylint errors
* Fix pylint errors v2
* Fix tests
* Fix tests v2
* Fix CalDAV parsing of recurring events
Some CaDAV servers (see: SOGo) return the original event that contains
the recurrence rules. The CalDAV calendar component sorts and filters
events based on their start and end dates, and was failing to properly
show recurring events based on these recurrence rules.
This this change checks if an event has recurrence rules and changes the
start/end dates of the event to today if the event is set to occur
today. This allows the rest of the component logic to function properly.
* Use date from nextmost occurence
* Adding unit tests
* Add endless event unit test
* Create new vevent for each event recurrence today
* Remove redundant unit test
* Add timezone to events that have none
Python cannot compare them otherwise.
* Simplify code, add comments & guard clause
* Add test for recurring all day event
* Account for all-day events
* Remove redundant code
* Remove redundant code
* Remove unnecessary deepcopy
* Add hourly recurring tests
* Add tests for hourly repeating event
* Fix unit test
* Use event.copy()