Commit graph

83 commits

Author SHA1 Message Date
Janusz Gregorczyk
7bab3579ec
Set required attribute when using Todoist Sync API reminder_add command (#122644)
* Set type=absolute when using Todoist Sync API reminder_add command.

This argument is required:

ref.: https://developer.todoist.com/sync/v8/#add-a-reminder

* Fix

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-08 16:50:24 +02:00
Erik Montnemery
38ef216894
Update icons.json to new service schema part 4 (#124771) 2024-08-28 13:48:13 +02:00
Chris Buckley
ab811f70b1
Todoist service validation error consistency (#123122) 2024-08-05 11:24:49 +02:00
Chris Buckley
6684f61a54
Add support for Todoist sections (#115671)
* Add support for Todoist sections

* ServiceValidationError & section name tweaks from PR comments

* Remove whitespace

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* More natural error message

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-08-03 09:07:13 +02:00
epenet
6c81885cae
Force alias when importing calendar PLATFORM_SCHEMA (#120512) 2024-06-26 10:40:17 +02:00
Aaron Godfrey
f934fea754
Apply all todoist custom project filters for calendar events (#117454)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-25 15:34:54 +02:00
David Symonds
f258034f9c
Support todoist task description in new_task service (#116203) 2024-06-22 12:42:46 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Marc Mueller
062cc4bfce
Add empty line after module docstring [t-v] (#112705) 2024-03-08 10:35:23 -05:00
Joost Lekkerkerker
96fbaa4000
Add icon translations to Todoist (#112312) 2024-03-05 14:20:32 +01:00
Erik Montnemery
b0ed8c4961
Migrate integrations s-t to generic flowhandler (#111865) 2024-02-29 22:16:14 +01:00
Aaron Godfrey
71e636572f
Send recurrence data when updating a task in todoist (#108269)
* Send recurrence data when updating a task in todoist

* Update tests/components/todoist/test_todo.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Move logic into _task_api_data.

* Add comment about sending potentinally stale data.

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2024-01-21 15:09:08 -08:00
Allen Porter
2497798b5d
Allow clearing To-do list item extended fields (#106208) 2023-12-27 13:14:59 +01:00
Aaron Godfrey
677c50a7cc
Exclude Todoist sub-tasks for the todo platform (#104914) 2023-12-04 20:37:09 +01:00
Bartosz Dokurno
13fdac23c1
Update Todoist config flow URL (#104992) 2023-12-04 14:58:37 +01:00
Allen Porter
64a6a6a778
Add due date and description fields to Todoist To-do entity (#104655)
* Add Todoist Due date and description fields

* Update entity features with new names

* Make items into walrus

* Update due_datetime field

* Add additional tests for adding new fields to items

* Fix call args in todoist test
2023-11-30 07:01:57 +01:00
Jan-Philipp Benecke
88850334f1
Fix typo in Todoist config flow (#103317) 2023-11-03 17:16:20 +01:00
Allen Porter
efc9f845db
Fix error message strings for Todoist configuration flow (#102968)
* Fix error message strings for Todoist configuration flow

* Update error code in test
2023-10-28 21:02:42 +02:00
tzagim
37cde54b2b
Fix typo in Todoist translations strings 'data' -> 'date' (#102760) 2023-10-25 09:48:47 +02:00
Allen Porter
0b8f48205a
Add Todoist To-do list support (#102633)
* Add todoist todo platform

* Fix comment in todoist todo platform

* Revert CalData cleanup and logging

* Fix bug in fetching tasks per project

* Add test coverage for creating active tasks

* Fix update behavior on startup
2023-10-24 22:47:26 +02:00
Allen Porter
368a1a944a
Remove the uniqueid from todoist (#100206) 2023-09-12 21:08:13 +02:00
Allen Porter
183b77973f
Add configuration flow to Todoist integration (#100094)
* Add config flow to todoist

* Fix service calls for todoist

* Fix configuration entry test setup

* Bump test coverage to 100%

* Apply pr feedback
2023-09-11 22:56:08 -07:00
Marc Mueller
525f39fe28
Update todoist-api-python to 2.1.2 (#98383) 2023-08-14 14:10:45 +02:00
Marc Mueller
07e20e1eab
Downgrade todoist-api-python to 2.0.2 and attrs to 22.2.0 (#98354) 2023-08-13 17:23:38 -05:00
Marc Mueller
85b097af50
Update todoist-api-python to 2.1.1 (#98263) 2023-08-12 09:39:59 -07:00
Franck Nijhof
4edec69637
Migrate integration services (T-V) to support translations (#96379) 2023-07-12 07:37:13 +02:00
Ville Skyttä
1ce74ba25c
Import util.dt as dt_util in components/[t-z]* (#93763) 2023-05-29 23:00:43 +02:00
Aaron Godfrey
bb170a2bbf
Fix todoist end time for tasks with due date in the future (#91874)
Fix end time for tasks with due date in the future.

Co-authored-by: Allen Porter <allen@thebends.org>
2023-05-27 10:09:11 -07:00
Aaron Godfrey
89f1677307
Fix todoist state updates (#91915)
* Update event when coordinator updates data.

* Move function to make diff easier to view

* Actually make it easier to view

* Move all tasks calculation to extra_state_attributes.
2023-05-24 14:46:13 +02:00
epenet
07aef27ea8
Fix lingering timer in todoist (#91808) 2023-04-21 16:41:54 +02:00
Allen Porter
4c5746d6ed
Update Todoist all day event handling following best practices (#90491) 2023-04-17 14:21:49 +02:00
Aaron Godfrey
7061b104a9
Fix tasks with no due date from not triggering on calendar state. (#91196)
Fix tasks with no due date.

Prior to this change we were setting the start date/time to utc rather
than the user's timezone.
2023-04-13 21:12:58 -07:00
Aaron Godfrey
9ccd43e5f1
Add DataUpdateCoordinator to the Todoist integration (#89836)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-28 18:57:24 +02:00
Aaron Godfrey
8b7594ae08
Look up todoist collaborators only when adding new task (#87957)
* Look up collaborators only when adding new task.

Also fixed a few api call arguments that were incorrect. The `labels`
key should have been a list of strings and the `assignee` key should
have been `assignee_id`.

* Add missing type in test.

* Remove print
2023-03-28 09:33:32 +02:00
Aaron Godfrey
745df277a0
Fix Todoist end date for all day event (#89837) 2023-03-26 22:08:36 +02:00
Aaron Godfrey
ab9bd5c29e
Fix todoist filtering custom projects by labels (#87904)
* Fix filtering custom projects by labels.

* Don't lowercase the label.

* Labels are case-sensitive, don't lowercase them.
2023-03-01 12:01:54 +01:00
Erik Montnemery
b0b1d8143f
Sort manifests 10 (#87031) 2023-02-08 20:41:50 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
Aaron Godfrey
8cbbdf21f3
Update todoist integration to use new official rest api library (#79481)
* Swapping out libraries.

* Adding types

* Add ability to add task.

* Removed remaining todos.

* Fix lint errors.

* Fixing tests.

* Update to v2 of the rest api.

* Swapping out libraries.

* Adding types

* Add ability to add task.

* Removed remaining todos.

* Fix lint errors.

* Fix mypy errors

* Fix custom projects.

* Bump DEPENDENCY_CONFLICTS const

* Remove conflict bump

* Addressing PR feedback.

* Removing utc offset logic and configuration.

* Addressing PR feedback.

* Revert date range logic check
2022-12-30 09:49:35 -08:00
Aaron Godfrey
3405fa60ec
Add more types to the todoist integration (#84210)
* Add more types to the todoist integration.

* Update tests.

* Update homeassistant/components/todoist/calendar.py

Pass f-string directly to strftime.

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Add back mistakenly removed local var.

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2022-12-19 20:29:57 -08:00
epenet
458001a06e
Improve entity type hints [t] (#77883) 2022-09-06 13:35:52 +02:00
Aaron Godfrey
91384e07d0
Add unique id for todoist calendar entity (#75674)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-08-01 17:15:51 +02: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
Aaron Godfrey
d302b0d14e
Fix todoist parsing due dates for calendar events (#65403) 2022-03-07 22:00:39 -08:00
J. Nick Koston
5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
Kai Bepperling
5954ca2b1f
Add ToDoist Assignee option for new task service (#63918)
Co-authored-by: Aaron Godfrey <me@aarongodfrey.dev>
2022-01-21 11:13:16 +01:00
epenet
ce6206b422
Add calendar setup type hints (#63272)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 13:14:02 +01:00
epenet
71a5b89691
Ensure service calls are typed in todoist (#63020)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-02 17:17:55 +01:00
Aaron Godfrey
c70a7020f5
Fix todoist due_today attribute for calendar events (#60038)
The attribute was comparing a UTC date to a local date which caused the
attribute to not be true in some cases.
2021-11-22 12:03:56 +01:00
Marc Mueller
84618fa831
Use assignment expressions 30 (#58714) 2021-10-30 16:33:42 +02:00