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>
This commit is contained in:
Allen Porter
2023-11-07 00:11:52 -08:00
committed by GitHub
parent b6a3f628d1
commit 0a05a16fcb
6 changed files with 257 additions and 15 deletions

View File

@@ -23,3 +23,10 @@ async def async_get_calendars(
for calendar, supported_components in zip(calendars, components_results)
if component in supported_components
]
def get_attr_value(obj: caldav.CalendarObjectResource, attribute: str) -> str | None:
"""Return the value of the CalDav object attribute if defined."""
if hasattr(obj, attribute):
return getattr(obj, attribute).value
return None