1
mirror of https://github.com/home-assistant/core synced 2024-08-28 03:36:46 +02:00
ha-core/homeassistant/components/todo/const.py
Martin Hjelmare 5f44dadb66
Rename todo due_date_time parameter to due_datetime (#104698)
* Rename todo due_date_time parameter to due_datetime

* Apply suggestions from code review

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-11-29 13:11:15 +01:00

33 lines
715 B
Python

"""Constants for the To-do integration."""
from enum import IntFlag, StrEnum
DOMAIN = "todo"
ATTR_DUE = "due"
ATTR_DUE_DATE = "due_date"
ATTR_DUE_DATETIME = "due_datetime"
ATTR_DESCRIPTION = "description"
class TodoListEntityFeature(IntFlag):
"""Supported features of the To-do List entity."""
CREATE_TODO_ITEM = 1
DELETE_TODO_ITEM = 2
UPDATE_TODO_ITEM = 4
MOVE_TODO_ITEM = 8
SET_DUE_DATE_ON_ITEM = 16
SET_DUE_DATETIME_ON_ITEM = 32
SET_DESCRIPTION_ON_ITEM = 64
class TodoItemStatus(StrEnum):
"""Status or confirmation of a To-do List Item.
This is a subset of the statuses supported in rfc5545.
"""
NEEDS_ACTION = "needs_action"
COMPLETED = "completed"