Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_tasks.todo Namespace Reference

Classes

class  GoogleTaskTodoListEntity
 

Functions

TodoItem _convert_api_item (dict[str, str] item)
 
dict[str, str|None] _convert_todo_item (TodoItem item)
 
list[dict[str, Any]] _order_tasks (list[dict[str, Any]] tasks)
 
None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 

Variables

 SCAN_INTERVAL = timedelta(minutes=15)
 
dictionary TODO_STATUS_MAP
 
dictionary TODO_STATUS_MAP_INV = {v: k for k, v in TODO_STATUS_MAP.items()}
 

Detailed Description

Google Tasks todo platform.

Function Documentation

◆ _convert_api_item()

TodoItem homeassistant.components.google_tasks.todo._convert_api_item ( dict[str, str]  item)
private
Convert tasks API items into a TodoItem.

Definition at line 52 of file todo.py.

◆ _convert_todo_item()

dict[str, str | None] homeassistant.components.google_tasks.todo._convert_todo_item ( TodoItem  item)
private
Convert TodoItem dataclass items to dictionary of attributes the tasks API.

Definition at line 33 of file todo.py.

◆ _order_tasks()

list[dict[str, Any]] homeassistant.components.google_tasks.todo._order_tasks ( list[dict[str, Any]]  tasks)
private
Order the task items response.

All tasks have an order amongst their siblings based on position.

Home Assistant To-do items do not support the Google Task parent/sibling
relationships and the desired behavior is for them to be filtered.

Definition at line 157 of file todo.py.

◆ async_setup_entry()

None homeassistant.components.google_tasks.todo.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback   async_add_entities 
)
Set up the Google Tasks todo platform.

Definition at line 71 of file todo.py.

Variable Documentation

◆ SCAN_INTERVAL

homeassistant.components.google_tasks.todo.SCAN_INTERVAL = timedelta(minutes=15)

Definition at line 24 of file todo.py.

◆ TODO_STATUS_MAP

dictionary homeassistant.components.google_tasks.todo.TODO_STATUS_MAP
Initial value:
1 = {
2  "needsAction": TodoItemStatus.NEEDS_ACTION,
3  "completed": TodoItemStatus.COMPLETED,
4 }

Definition at line 26 of file todo.py.

◆ TODO_STATUS_MAP_INV

dictionary homeassistant.components.google_tasks.todo.TODO_STATUS_MAP_INV = {v: k for k, v in TODO_STATUS_MAP.items()}

Definition at line 30 of file todo.py.