1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-11 16:47:52 +01:00
Files
core/homeassistant/components/remote/condition.py
T
2026-04-21 13:41:53 +02:00

18 lines
603 B
Python

"""Provides conditions for remotes."""
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.core import HomeAssistant
from homeassistant.helpers.condition import Condition, make_entity_state_condition
from . import DOMAIN
CONDITIONS: dict[str, type[Condition]] = {
"is_off": make_entity_state_condition(DOMAIN, STATE_OFF, support_duration=True),
"is_on": make_entity_state_condition(DOMAIN, STATE_ON, support_duration=True),
}
async def async_get_conditions(hass: HomeAssistant) -> dict[str, type[Condition]]:
"""Return the remote conditions."""
return CONDITIONS