Commit Graph

73 Commits

Author SHA1 Message Date
J. Nick Koston 5a609c34bb
Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
Sid 2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
J. Nick Koston 4e983d710f
Fix misssing timeout in caldav (#115247) 2024-04-08 11:09:18 -10:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Paulus Schoutsen f416d67d21
Remove built-in support for import_executor in manifest (#112725) 2024-03-08 12:02:32 -05:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
J. Nick Koston f415746e26
Import caldav in the executor to avoid blocking the event loop (#112081)
2024-03-02 18:21:51.794 DEBUG (MainThread) [homeassistant.loader] Component caldav import took 0.676 seconds (loaded_executor=False)
2024-03-02 21:55:20 -05:00
J. Nick Koston ea9c969d15
Fix executor being overloaded in caldav (#112084)
Migrate to using a single executor job instead of creating
one per calendar. If the user had a lot of calendars the
executor would get overloaded
2024-03-02 21:53:51 -05:00
Erik Montnemery 6fe28d3764
Migrate integrations a-d to generic flowhandler (#111861) 2024-02-29 20:07:14 +01:00
Marc Mueller a492ccdc15
Update caldav to 1.3.9 (#111429) 2024-02-25 15:00:37 -10:00
Allen Porter 2497798b5d
Allow clearing To-do list item extended fields (#106208) 2023-12-27 13:14:59 +01:00
Julien "_FrnchFrgg_" Rivaud bf9c2a08b7
Bump caldav to 1.3.8 (#105508)
* 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
2023-12-11 19:42:52 -08:00
Florian B 063ac53f01
Fix adding/updating todo items with due date in CalDAV integration (#105435)
* 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
2023-12-10 08:23:05 -08:00
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