* Add initial implementation of calendar trigger
This is an initial implementation of a calendar trigger, that supports
triggering on calendar start time.
See architecture proposal in:
https://github.com/home-assistant/architecture/discussions/700
* Address reviewer feedback
* Use f-strings for all tests
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove logging f-strings, and move to main code
* Remove mypy ignore
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update calendar triggers to use new calendar data model
* Update tests/components/calendar/test_trigger.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Rewrite tests using freezegun
Rewrite tests using freezegun and improve edge case handling, and use utc consistently for all alarms.
* Update homeassistant/components/calendar/trigger.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/calendar/trigger.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Increase test coverage based on pr feedback
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* 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
* Remove malformed pylint disable markers
* Remove some unused imports
* Remove some unneeded lint exclusions
* Remove more unneeded lint exclusions
* Add specific codes to all noqa's
* Correct google calendar test name
* Rewrite calendar component
* Save component in hass.data.
* Rename device_state_attributes to state_attributes.
* Remove offset attribute from base state_attributes.
* Extract offset helpers to calendar component.
* Clean imports.
* Remove stale constants.
* Remove name and add async_get_events.
* Add normalize_event helper function. Copied from #21495.
* Add event property to base entity.
* Use event property for calendar state.
* Ensure event start and end.
* Remove entity init.
* Add comment about event data class.
* Temporary keep old start and end datetime format.
* Convert demo calendar
* Convert google calendar
* Convert google calendar.
* Clean up google component.
* Keep offset feature by using offset helpers.
* Convert caldav calendar
* Clean up caldav calendar.
* Update caldav cal on addition.
* Bring back offset to caldav calendar.
* Copy caldav event on update.
* Convert todoist calendar
* Add Calendar API endpoint to get events
* Set default event color
* Fix PR comments
* Fix PR comments
* Fix PR comments
* Remote local.py file
* Use iso 8601
* Fix lint
* Fix PR comments
* Fix PR comments
* Add Support for todoist and demo calendar
* Todoist events are allday events
* Add calendar demo api endpoint test
* Register only one api endpoint for calendar
* Rename demo calendar
* Added basic Todoist support
Creating a new platform for Todoist - https://todoist.com
* Added more robust support for creating new custom projects.
This means you can now specify things such as 'all tasks due today', 'all tasks due this week', etc.
* Changed logging from warning to info.
* Added label and comment support.
* Added support for overdue tasks.
* Changed logging to info instead of warning; fixed labels.
* Added ability to filter projects by name.
* Rename 'extra_projects' to 'custom_projects'.
* Updated code to follow proper HASS style guidelines.
* Got new_task service running.
* Update .coveragerc.
* Remove old try-catch block.
This is left over from before we validated the inputs using the service schema.
* Updated to use PLATFORM_SCHEMA.
* Updated component to use Todoist API.
* Removed commented-out code.
This also removes functionality regarding finding out how many comments a task has.
This functionality may be added back in the future.
* Clarified TodoistProjectData, removed fetching comments.
* Fixed bug where projects were grabbing all tasks.
* Fixed bug where due dates were being ignored.
* Removed debug logging.
* Fixed linter errors.
* Fixed Todoist docstring to be in line with HASS' style rules.
* Organized imports.
* Fixed voluptuous schema.
* Moved ID lookups into .
* Moved ID lookups into setup_platform.
* Cleaned up setup_platform a bit.
* Cleaned up Todoist service calls.
* Changed debug logging level.
* Fixed issue with configuration not validating.
* Changed from storing the token to storing an API instance.
* Use dict instead of Project object.
* Updated to use list comprehension where possible.
* Fixed linter errors.
* Use constants instead of literals.
* Changed logging to use old-style string formatting.
* Removed unneeded caching.
* Added comments explaining 'magic' strings.
* Fixed bug where labels were always on the whitelist.
* Fixed linter error.
* Stopped checking whitelist length explicitly.