278 files

This commit is contained in:
Home Assistant Version Control committed 2026-09-13 20:38:58 +00:00
1 parent d7a0a08372
commit 1b4f5f68c6
278 files changed
+36892 -7150

No files matched your search

@@ -27,11 +27,13 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import (
COMPLETION_PROVENANCE_NOTES,
CONF_OBJECT,
CONF_TASK_ENABLED,
CONF_TASKS,
DOMAIN,
GLOBAL_UNIQUE_ID,
NOTIFIABLE_STATUSES,
MaintenanceStatus,
)
@@ -42,14 +44,9 @@ _LOGGER = logging.getLogger(__name__)
PARALLEL_UPDATES = 0
# Statuses that make a task "actionable" in the to-do list (needs_action).
_ACTION_STATUSES = frozenset(
{
MaintenanceStatus.DUE_SOON,
MaintenanceStatus.OVERDUE,
MaintenanceStatus.TRIGGERED,
}
)
# Statuses that make a task "actionable" in the to-do list (needs_action) —
# the same set a reminder can be about.
_ACTION_STATUSES = NOTIFIABLE_STATUSES
async def async_setup_entry(
@@ -171,8 +168,9 @@ class MaintenanceTodoList(TodoListEntity):
return
await coordinator.complete_maintenance(
task_id,
notes="Completed from the To-do list",
notes=COMPLETION_PROVENANCE_NOTES["todo"],
unattended=True,
source="todo",
# HA's entity-service call carries the user in the context.
completed_by=self._context.user_id if self._context else None,
)