1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-20 15:30:26 +01:00
Files
2026-04-30 18:13:06 +02:00

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