mirror of
https://github.com/home-assistant/core.git
synced 2026-05-20 15:30:26 +01:00
05eeb6a1bc
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
21 lines
568 B
Python
21 lines
568 B
Python
"""Provides conditions for to-do lists."""
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers.condition import (
|
|
Condition,
|
|
make_entity_numerical_condition,
|
|
make_entity_state_condition,
|
|
)
|
|
|
|
from .const import DOMAIN
|
|
|
|
CONDITIONS: dict[str, type[Condition]] = {
|
|
"all_completed": make_entity_state_condition(DOMAIN, "0"),
|
|
"incomplete": make_entity_numerical_condition(DOMAIN),
|
|
}
|
|
|
|
|
|
async def async_get_conditions(hass: HomeAssistant) -> dict[str, type[Condition]]:
|
|
"""Return the to-do list conditions."""
|
|
return CONDITIONS
|