Commit graph

30 commits

Author SHA1 Message Date
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ()
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
87165c0d6e
Add empty line after module docstring [tests t-z] () 2024-03-08 14:44:56 +01:00
Aaron Godfrey
71e636572f
Send recurrence data when updating a task in todoist ()
* 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 () 2023-12-27 13:14:59 +01:00
Aaron Godfrey
677c50a7cc
Exclude Todoist sub-tasks for the todo platform () 2023-12-04 20:37:09 +01:00
Allen Porter
64a6a6a778
Add due date and description fields to Todoist To-do entity ()
* 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
Allen Porter
a1aff5f4a0
Add websocket todo/item/subscribe for subscribing to changes to todo list items ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-28 08:27:51 +01:00
Erik Montnemery
64f8967739
Fix todoist todo tests () 2023-10-31 02:38:18 +01:00
Allen Porter
efc9f845db
Fix error message strings for Todoist configuration flow ()
* Fix error message strings for Todoist configuration flow

* Update error code in test
2023-10-28 21:02:42 +02:00
Allen Porter
0b8f48205a
Add Todoist To-do list support ()
* 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
183b77973f
Add configuration flow to Todoist integration ()
* 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
Allen Porter
01a6173cc9
Fix failing todoist test that used timezone before set by fixture ()
* Fix failing todoist test that used timezone before set by fixture

* Merge fix for dt -> dt_util
2023-05-29 22:45:22 -04:00
Ville Skyttä
1ce74ba25c
Import util.dt as dt_util in components/[t-z]* () 2023-05-29 23:00:43 +02:00
Aaron Godfrey
bb170a2bbf
Fix todoist end time for tasks with due date in the future ()
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 ()
* 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
Allen Porter
4c5746d6ed
Update Todoist all day event handling following best practices () 2023-04-17 14:21:49 +02:00
Allen Porter
b0e0ada512
Streamline todoist test fixtures () 2023-04-16 14:20:07 +02:00
Aaron Godfrey
7061b104a9
Fix tasks with no due date from not triggering on calendar state. ()
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 ()
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 ()
* 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 () 2023-03-26 22:08:36 +02:00
epenet
a0f725dfcb
Add type hints to tests () 2023-03-10 12:06:50 +01:00
epenet
d65dff3f9e
Adjust entity registry access in tests (2) () 2023-03-01 16:23:36 +01:00
Aaron Godfrey
ab9bd5c29e
Fix todoist filtering custom projects by labels ()
* 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
epenet
88cfbf6a34
Add type hints to integration tests (part 22) () 2023-02-16 14:08:03 +01:00
Franck Nijhof
c56832bb2c
Enable Ruff SIM300 () 2023-01-30 11:03:23 +01:00
Aaron Godfrey
8cbbdf21f3
Update todoist integration to use new official rest api library ()
* 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 ()
* 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
Aaron Godfrey
91384e07d0
Add unique id for todoist calendar entity ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-08-01 17:15:51 +02:00
Aaron Godfrey
d302b0d14e
Fix todoist parsing due dates for calendar events () 2022-03-07 22:00:39 -08:00