* Add update support for calendars and implement in local calendar
* Fix supported feature for update calendar
* Increase test coverage for websocket error cases
* Improve test coverage for update failure cases
* Improve test coverage by sharing code between update and create
* Update homeassistant/components/calendar/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add support for calendar trigger offsets
* Add offset end test
* Update homeassistant/components/calendar/trigger.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Always include offset in trigger data
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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>
* Moved climate components with tests into platform dirs.
* Updated tests from climate component.
* Moved binary_sensor components with tests into platform dirs.
* Updated tests from binary_sensor component.
* Moved calendar components with tests into platform dirs.
* Updated tests from calendar component.
* Moved camera components with tests into platform dirs.
* Updated tests from camera component.
* Moved cover components with tests into platform dirs.
* Updated tests from cover component.
* Moved device_tracker components with tests into platform dirs.
* Updated tests from device_tracker component.
* Moved fan components with tests into platform dirs.
* Updated tests from fan component.
* Moved geo_location components with tests into platform dirs.
* Updated tests from geo_location component.
* Moved image_processing components with tests into platform dirs.
* Updated tests from image_processing component.
* Moved light components with tests into platform dirs.
* Updated tests from light component.
* Moved lock components with tests into platform dirs.
* Moved media_player components with tests into platform dirs.
* Updated tests from media_player component.
* Moved scene components with tests into platform dirs.
* Moved sensor components with tests into platform dirs.
* Updated tests from sensor component.
* Moved switch components with tests into platform dirs.
* Updated tests from sensor component.
* Moved vacuum components with tests into platform dirs.
* Updated tests from vacuum component.
* Moved weather components with tests into platform dirs.
* Fixed __init__.py files
* Fixes for stuff moved as part of this branch.
* Fix stuff needed to merge with balloob's branch.
* Formatting issues.
* Missing __init__.py files.
* Fix-ups
* Fixup
* Regenerated requirements.
* Linting errors fixed.
* Fixed more broken tests.
* Missing init files.
* Fix broken tests.
* More broken tests
* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.
* Disabled tests, will remove sensor in #22147
* Updated coverage and codeowners.
* 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
* Fix Google Calendar caching when offline
Events from Google Calendar were not firing under the following
circumstances:
1. Start ha as normal with Google Calendar configured as per
instructions.
2. ha loses network connectivity to Google
3. ha attempts update of Google Calendar
4. calendar/google component throws uncaught Exception causing update
method to not return
5. (cached) Google Calendar event does not fire, remains "Off"
Catching the Exception and returning False from the update() method
causes the correct behavior (i.e., the calendar component firing the
event as scheduled using cached data).
* Add requirements
* Revert code cleanup
* Remove explicit return value from update()
* Revert "Remove explicit return value from update()"
This reverts commit 7cd77708af.
* Use MockDependency decorator
No need to whitelist google-python-api-client for a single unit test at
this point.