mirror of
https://github.com/home-assistant/core.git
synced 2026-04-17 23:53:49 +01:00
16 lines
449 B
Python
16 lines
449 B
Python
"""Provides conditions for counters."""
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers.condition import Condition, make_entity_numerical_condition
|
|
|
|
DOMAIN = "counter"
|
|
|
|
CONDITIONS: dict[str, type[Condition]] = {
|
|
"is_value": make_entity_numerical_condition(DOMAIN),
|
|
}
|
|
|
|
|
|
async def async_get_conditions(hass: HomeAssistant) -> dict[str, type[Condition]]:
|
|
"""Return the conditions for counters."""
|
|
return CONDITIONS
|