Commit Graph

60 Commits (5014e2f0c735c0750004c28157c83cda391fc4a7)

Author SHA1 Message Date
Michael 68e883dc63
Fix runtime error in CalDAV (#104800) 2023-11-30 13:50:58 +01:00
Allen Porter af2f8699b7
Add due date and description to CalDAV To-do (#104656)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2023-11-29 19:35:36 +01:00
Allen Porter 613afe322f
Add CalDAV To-do item support for Add, Update, and Delete (#103922)
* Add CalDAV To-do item support for Add, Update, and Delete

* Remove unnecessary cast

* Fix ruff error

* Fix ruff errors

* Remove exception from error message

* Remove unnecessary duplicate state update
2023-11-15 19:57:46 -05:00
Allen Porter 0a05a16fcb
Add read-only Caldav todo platform (#103415)
* 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>
2023-11-07 09:11:52 +01:00
Allen Porter 936956a430
Fix CalDAV supported components check when configured from the UI (#103411)
* 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
2023-11-05 01:36:00 +01:00
Allen Porter a95aa4e15f
Add config flow to CalDAV (#103215)
* 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>
2023-11-02 19:48:56 -07:00
Allen Porter 4e22958486
Move caldav coordinator to its own file (#102976)
* Move caldav coordinator to its own file.

* Remove unused offset.
2023-10-29 09:04:09 +01:00
Allen Porter 4599b788b4
Update caldav to use an DataUpdateCoordinator for fetching data (#102089) 2023-10-28 15:35:31 -07:00
Allen Porter 3577547eb3
Skip CalDAV calendars that do not support events (#102059) 2023-10-15 21:55:11 +02:00
Ville Skyttä 3b4774d9ed
Remove unnnecessary pylint configs from components/[a-d]* (#98911) 2023-08-24 00:54:02 +02:00
Marc Mueller 7cf1ff887d
Update caldav to 1.3.6 (#98371) 2023-08-14 10:31:24 +02:00
Marc Mueller e25fdebda1
Add types-caldav dependency (#98265) 2023-08-13 11:58:55 -05:00
Andreas Lindhé 6c8971f18a
Improve code quality of CalDav (#97570)
* Use keyword arguments when constructing `WebDavCalendarData`

* Use keyword arguments when constructing `WebDavCalendarEntity`

* Remove random newlines
2023-08-05 20:44:26 +02:00
Ville Skyttä ced67e5800
Import `util.dt` as `dt_util` in `components/[a-d]*` (#93756) 2023-05-30 00:02:06 +03:00
Ville Skyttä f5cba290ad
Access datetime.datetime and .time directly in caldav (#93688) 2023-05-29 20:27:47 +02:00
Allen Porter 4ddcb14053
Add additional CalendarEvent validation (#89533)
Add additional event validation
2023-03-14 20:27:38 -04:00
stickpin 735000475a
Upgrade caldav to 1.2.0 (#88791) 2023-02-27 11:29:46 +01:00
stickpin 84823d2fcf
Upgrade caldav to 1.1.3 (#88681)
* Update caldav to 1.1.3

* update caldav to 1.1.3

* update caldav to 1.1.3

---------

Co-authored-by: Allen Porter <allen@thebends.org>
2023-02-24 06:32:59 +00:00
stickpin 4f17f2ef5f
Upgrade caldav to 1.1.1 (#88378) 2023-02-18 13:16:46 +01:00
Erik Montnemery 87420e949d
Sort manifests 2 (#87023) 2023-02-08 20:16:39 +01:00
Daniele Ricci 70a9c8f8aa
Upgrade caldav to 1.0.1 (#85536)
Upgrade caldav (fix #40127)

date_search was deprecated in favour of search which also implements client-side recurring events expansion
2023-01-22 16:00:19 -08:00
Allen Porter a1588cd6af
Fix caldav calendars with custom timezones (#84955)
* Fix caldav calendars with custom timezones

* Revert whitespace change
2023-01-01 20:11:34 -05:00
Allen Porter 128ccbaa57
Gracefully handle caldav event with missing summary (#84719)
fixes undefined
2022-12-28 22:07:51 +01:00
epenet 0f792eb92e
Improve entity type hints [c] (#77023) 2022-08-19 13:02:46 +02:00
Franck Nijhof 65378f19c8
Update caldav to 0.9.1 (#73472) 2022-06-14 12:21:02 +02:00
Allen Porter 8c50c7fbd4
Fix bug in caldav and avoid unnecessary copy of dataclass (#72922) 2022-06-02 08:40:13 -07:00
screenagerbe 00291fb1a6
update to caldav v0.9.0 (#71406) 2022-05-07 17:41:09 -07:00
Allen Porter f99b6004ea
Cleanup calendar APIs and introduce a dataclass for representing events (#68843)
* 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>
2022-04-10 12:04:07 -07:00
Allen Porter f61c911174
Remove some offset complexity from calendar event (#68724)
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
2022-03-27 10:02:19 -07:00
jkuettner 42024c1ed3
Fix "vevent" KeyError in caldav component again (#65685)
* Fix "vevent" KeyError in caldav component again

* code formatting
2022-02-04 18:47:31 +01:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
epenet ce6206b422
Add calendar setup type hints (#63272)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 13:14:02 +01:00
chpego 39df04495d
Bump caldav version to 0.8.2 (#63280) 2022-01-03 13:05:35 +01:00
jkuettner 3b97c544b1
Fix "vevent" KeyError in caldav component (#61718) 2021-12-17 16:54:19 +01:00
Robert Hillis d371ab9deb
Use entity class attributes for caldav (#53332) 2021-07-22 14:47:30 +02:00
TOM 3f66709882
Fix caldav TZ interpretation of all day events (#48642) 2021-06-29 00:07:29 -07:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery 6c084ae6ce
Update integrations a-e to override extra_state_attributes() (#47756) 2021-03-11 16:51:03 +01:00
Pieter Mulder c1586f97db
Only show matching caldav events in calendar (#45701) 2021-01-29 15:25:01 +01:00
chpego d315ab2cf5
Bump caldav version to 0.7.1 (#44815)
* bump caldav version 0.7.1

* Update requirements_all.txt

* Update requirements_test_all.txt
2021-01-04 16:49:01 -07:00
J. Nick Koston cdd17b4215
Update caldav to use async_add_executor_job (#41808)
self.calendar.date_search was already being run in the executor in
other places so this should be safe
2020-10-14 08:18:23 +02:00
nicx 9871efd52f
Add CalDAV upcoming appointments period option (#34584)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-03 09:54:51 -07:00
Bram Kragten e74e0d1710
Fix caldav event for calendar panel (#35653) 2020-05-15 12:36:02 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
springstan 9801810552
Use f-strings in integrations starting with "B"-"E" (#32121)
* 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
2020-02-24 08:47:52 -08:00
Philip Rosenberg-Watt fb8cbc2e93
Fix CalDAV recurring events (#31805)
* 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()
2020-02-15 19:31:36 -08:00
Franck Nijhof 8d1f8055dd
Fix spelling of NETGEAR and CalDAV in manifests (#31790) 2020-02-13 19:20:26 +01:00
Franck Nijhof 345cc244ed
Correct names in manifests (C-L) (#30532) 2020-01-07 08:19:17 +01:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Lukas 65263bdef9 Fix #28104 - CalDav support for floating datetimes (#28123)
* Fix #28104 - CalDav support for floating datetimes

Timzones are optional in CalDav

It is possible that an entry contains neither a TZID, nor is an UTC time.
When this is the case, it should be treated as a floating date-time value,
which represent the same hour, minute, and second value regardless of which
time zone is currently being observed.

For Home-Assistant the correct timezone therefore is whatever is configured
as local time in the settings.

See https://www.kanzaki.com/docs/ical/dateTime.html

* Revert "Fix #28104 - CalDav support for floating datetimes"

This reverts commit cf32a6e390.

* add test case: floating events fail with error without patch

* Fix #28104 - CalDav support for floating datetimes

Timzones are optional in CalDav

It is possible that an entry contains neither a TZID, nor is an UTC time.
When this is the case, it should be treated as a floating date-time value,
which represent the same hour, minute, and second value regardless of which
time zone is currently being observed.

For Home-Assistant the correct timezone therefore is whatever is configured
as local time in the settings.

See https://www.kanzaki.com/docs/ical/dateTime.html

* style fix
2019-10-22 23:08:38 -07:00