* Support multiple config entries at once
* Add test coverage for multiple config entries
* Add support for multiple config entries to google config flow
* Clear hass.data when unloading config entry
* Make google config flow defensive against reuse of the same account
* Assign existing google config entries a unique id
* Migrate entities to new unique id format
* Support muliple accounts per oauth client id
* Fix mypy typing errors
* Hard fail to keep state consistent, removing graceful degredation
* Remove invalid entity regsitry entries
* Deprecate google calendar add_event service, replaced with entity service
* Fix inconsistencies and bugs in input validation
* Update validation rules and exceptions
* Resolve merge conflicts
* Stop updating google_calendars.yaml if it does not already exist
* Add additional test coverage to make CI pass
* Add test for no updates to google_calendar.yaml
* Add parameter to test for expecting write calls
* Missing call argument
* Remove conditional and replace with inline assert
* Add google application_credentials platform
* Further simplify custom auth implementation overrides
* Add test coverage in application_credentials
* Simplify wording in a comment
* Remove unused imports accidentally left from merge
* Wrap lines that are too long for style guide
* Move application credential loading to only where it is needed
* Leave CLIENT_ID and CLIENT_SECRET as required.
* Prepare google calendar integration for Application Credentials
Update google calendar integration to have fewer dependencies on
yaml configuration data to prepare for supporting application
credentials, which means setup can happen without configuration.yaml
at all. This pre-factoring will allow the following PR adding
application credentials support to be more focused.
* Add test coverage for device auth checks
* Switch to google calendar async iterator api
* Update homeassistant/components/google/calendar.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add test coverage for paging through results
* Bump gcal_sync to 0.6.1
* Bump gcal-sync 0.6.2
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use new aiohttp based google client library in gcal_sync.
* Use base url in tests for shorter string
* Remove unnecessary line of code
* Jump to gcal-sync-0.4.1
* Update tests/components/google/conftest.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update to gcal_sync 0.5.0 incorporating PR feedback
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Move the offset reached computation outside of the update method so that it is
computed when state updates occur rather than when data refreshes happen (which
are throttled and happen at most every 15 minutes).
Issue #69892
* 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>
* Refresh google calendar tokens with invalid expiration times
* Update tests/components/google/conftest.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove unnecessary async methods in functions being touched already
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
* Make google calendar loading API centric, not loading from yaml
Update the behavior for google calendar to focus on loading calendars based on the
API and using the yaml configuration to override behavior. The old behavior was
to first load from yaml, then also load from the API, which is atypical.
This is pulled out from a larger change to rewrite calendar using async and config
flows.
Tests needed to be updated to reflect the new API centric behavior, and changing
the API call ordering required changing tests that exercise failures.
* Update to use async_fire_time_changed to invoke updates