Files
core/homeassistant/components/valve/const.py
T

39 lines
734 B
Python

"""Constants for the Valve entity platform."""
from enum import IntFlag, StrEnum
DOMAIN = "valve"
class ValveEntityStateAttribute(StrEnum):
"""State attributes for valve entities."""
IS_CLOSED = "is_closed"
CURRENT_POSITION = "current_position"
class ValveDeviceClass(StrEnum):
"""Device class for valve."""
# Refer to the valve dev docs for device class descriptions
WATER = "water"
GAS = "gas"
class ValveEntityFeature(IntFlag):
"""Supported features of the valve entity."""
OPEN = 1
CLOSE = 2
SET_POSITION = 4
STOP = 8
class ValveState(StrEnum):
"""State of Valve entities."""
OPENING = "opening"
CLOSING = "closing"
CLOSED = "closed"
OPEN = "open"