Commit Graph

110 Commits (f4b252a51d4c450821920e696339c8122180b531)

Author SHA1 Message Date
Matej Drobnič 690fb2ae86
Add back description and location to calendar endpoint (#71887) 2022-05-15 20:31:22 +02:00
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
Allen Porter f99b6004ea
Cleanup calendar APIs and introduce a dataclass for representing events (#68843)
* 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>
2022-04-10 12:04:07 -07:00
Allen Porter 68d563c630
Remove calendar mypy ignores, now that calendar has full typing (#69051) 2022-04-01 07:46:48 +02:00
Allen Porter f61c911174
Remove some offset complexity from calendar event (#68724)
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
2022-03-27 10:02:19 -07:00
Allen Porter f05a6826de
Add additional type hints for calendar integration (#68660) 2022-03-27 17:08:28 +02:00
GitHub Action 66d757115c [ci skip] Translation update 2022-03-11 00:21:48 +00:00
jan iversen 0d8ff3d724
Add codeowner to internal integrations that are without (#67286) 2022-02-28 09:06:16 +01:00
GitHub Action ca7d4234e1 [ci skip] Translation update 2022-01-31 00:14:28 +00:00
epenet 946238fb02
Import frontend (#64104)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-14 10:01:12 +01:00
epenet 9e16f87ddc
Add init type hints [b-c] (#63100)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-02 17:05:18 +01:00
GitHub Action f0c9f443d1 [ci skip] Translation update 2021-11-15 00:12:46 +00:00
GitHub Action 4634b65924 [ci skip] Translation update 2021-10-21 00:12:43 +00:00
Marc Mueller 5048bad050
Use assignment expressions 05 (#57785) 2021-10-17 19:56:00 +02:00
Ville Skyttä cc97502a0c
Use HTTPStatus instead of HTTP_* consts in aiohttp web response statuses (#56541) 2021-10-01 09:27:44 -07:00
GitHub Action 8c5620e74b [ci skip] Translation update 2021-08-02 03:40:04 +00:00
GitHub Action 0c5ce9cac2 [ci skip] Translation update 2021-07-07 00:11:57 +00:00
Franck Nijhof 7947946793
Type entry setup/unload for entity components (#51912) 2021-06-17 10:10:26 +02:00
GitHub Action 1f80defe3a [ci skip] Translation update 2021-05-18 00:12:13 +00:00
Martin Hjelmare 7e30ab2fb2
Add missing internal quality scale label (#48947)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-10 12:37:20 +02:00
Erik Montnemery 346a724ac3
Mark base components' state_attribute @final, rename others to extra_state_attributes (#48161)
* Mark base state_attributes @final, rename others to extra_state_attributes

* Fix calendar, update tests
2021-03-21 10:38:24 +01:00
Marc Mueller 7c0734bdd5
Update typing 05 (#48038) 2021-03-17 23:43:55 +01:00
HomeAssistant Azure c11b85af2f [ci skip] Translation update 2021-03-16 00:04:36 +00:00
HomeAssistant Azure b102ad731f [ci skip] Translation update 2020-10-22 00:09:52 +00:00
Olen abeff01626
Add async_setup_entry to calendar platform (#42075) 2020-10-21 13:20:34 +02:00
Ville Skyttä f28c3273c2
Upgrade mypy to 0.790 (#41595) 2020-10-12 19:17:30 -05:00
HomeAssistant Azure 6ae12c3faf [ci skip] Translation update 2020-10-10 00:05:05 +00:00
HomeAssistant Azure f4a518edcc [ci skip] Translation update 2020-05-30 00:03:23 +00:00
Ville Skyttä f8416484f8
More data entry flow and HTTP related type hints (#34430) 2020-05-26 09:28:22 -05:00
Paulus Schoutsen 0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
Zack Arnett 2148f63d89
Activate Calendar Panel (#35276) 2020-05-09 23:00:28 +02:00
HomeAssistant Azure aa2bfbb541 [ci skip] Translation update 2020-04-27 00:02:20 +00:00
Joakim Sørensen 730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Paulus Schoutsen 95357dfc55 Update translations 2020-04-20 16:33:54 -07:00
Paulus Schoutsen d560e8245a
Import state strings (#34451) 2020-04-20 16:25:35 -07:00
Paulus Schoutsen 0d60d40512 Update translations 2020-04-16 13:00:10 -07:00
Paulus Schoutsen 6119e79023
Migrate frontend translations of domains to backend (#34294) 2020-04-16 11:52:27 -07:00
springstan 4c38e6cfa5
Use HTTP_BAD_REQUEST constant (#33797) 2020-04-09 21:43:42 +02:00
springstan fca90a8ddc
Improve string formatting v5 (#33697)
* Improve string formatting v5

* Address review comments
2020-04-05 17:48:55 +02:00
Franck Nijhof 39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* Add prettier (in pre-commit and CI)

* Make all file prettier

* Change order

* Add to Azure Pipelines

* Fix a YAML file prettier caught as invalid

* Remove flow mapping using curly braces from all YAML service files
2020-04-05 17:27:16 +02:00
Franck Nijhof 886308a953
String formatting improvements (#33653) 2020-04-04 21:39:22 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Paulus Schoutsen 9aa02e35a7
Entity Component to no longer generate automatic groups (#23789) 2020-01-07 17:30:53 +01:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Bas Nijholt 080c702d4f Sort imports according to PEP8 for components starting with "C" (#29763) 2019-12-09 18:56:21 +01:00
Raman Gupta 1681d36637 Update service domain for todoist from 'calendar' to 'todoist' (#29131)
* move todoist constants to const.py and update service domain

* update .coveragerc

* remove unused variable

* save file
2019-11-27 11:26:59 +01:00
Ville Skyttä d88ca0f5cb Lint exclusions (#28655)
* 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
2019-11-16 10:22:07 +01:00