Commit Graph

4 Commits (236d8aa277354870e59c4496fd85adb488ef40bf)

Author SHA1 Message Date
Allen Porter 285fdeb581
Add calendar trigger offsets (#70963)
* 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>
2022-04-30 17:21:30 -07:00
Allen Porter dc7e3a6df6
Fix boundary case in calednar trigger (#70467)
Update calendar trigger scan logic to add a one second boundary due to the
exclusive search. Add a test that reproduced the issue.
2022-04-24 12:52:17 -07:00
Allen Porter 5ffaa70bb6
Add calendar event end trigger (#70372)
* Add calendar event end trigger

* Rename start date to last_endtime

* Rename now to last_endtime
2022-04-22 21:19:35 -07:00
Allen Porter a2c74b9786
Add initial implementation of a calendar trigger (#68674)
* 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>
2022-04-21 08:09:50 -07:00