mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 22:25:13 +02:00
Add new climate enums
This commit is contained in:
@@ -42,31 +42,64 @@ HVAC_MODE_DRY = "dry"
|
|||||||
HVAC_MODE_FAN_ONLY = "fan_only"
|
HVAC_MODE_FAN_ONLY = "fan_only"
|
||||||
HVAC_MODES = [cls.value for cls in HVACMode]
|
HVAC_MODES = [cls.value for cls in HVACMode]
|
||||||
|
|
||||||
|
|
||||||
|
class Preset(StrEnum):
|
||||||
|
"""Preset for climate devices."""
|
||||||
|
|
||||||
# No preset is active
|
# No preset is active
|
||||||
PRESET_NONE = "none"
|
NONE = "none"
|
||||||
|
|
||||||
# Device is running an energy-saving mode
|
# Device is running an energy-saving mode
|
||||||
PRESET_ECO = "eco"
|
ECO = "eco"
|
||||||
|
|
||||||
# Device is in away mode
|
# Device is in away mode
|
||||||
PRESET_AWAY = "away"
|
AWAY = "away"
|
||||||
|
|
||||||
# Device turn all valve full up
|
# Device turn all valve full up
|
||||||
PRESET_BOOST = "boost"
|
BOOST = "boost"
|
||||||
|
|
||||||
# Device is in comfort mode
|
# Device is in comfort mode
|
||||||
PRESET_COMFORT = "comfort"
|
COMFORT = "comfort"
|
||||||
|
|
||||||
# Device is in home mode
|
# Device is in home mode
|
||||||
PRESET_HOME = "home"
|
HOME = "home"
|
||||||
|
|
||||||
# Device is prepared for sleep
|
# Device is prepared for sleep
|
||||||
PRESET_SLEEP = "sleep"
|
SLEEP = "sleep"
|
||||||
|
|
||||||
# Device is reacting to activity (e.g. movement sensors)
|
# Device is reacting to activity (e.g. movement sensors)
|
||||||
|
ACTIVITY = "activity"
|
||||||
|
|
||||||
|
|
||||||
|
# These PRESET_* constants are deprecated as of Home Assistant 2022.10.
|
||||||
|
# Please use the Preset enum instead.
|
||||||
|
PRESET_NONE = "none"
|
||||||
|
PRESET_ECO = "eco"
|
||||||
|
PRESET_AWAY = "away"
|
||||||
|
PRESET_BOOST = "boost"
|
||||||
|
PRESET_COMFORT = "comfort"
|
||||||
|
PRESET_HOME = "home"
|
||||||
|
PRESET_SLEEP = "sleep"
|
||||||
PRESET_ACTIVITY = "activity"
|
PRESET_ACTIVITY = "activity"
|
||||||
|
|
||||||
# Possible fan state
|
|
||||||
|
class FanState(StrEnum):
|
||||||
|
"""Fan state for climate devices."""
|
||||||
|
|
||||||
|
ON = "on"
|
||||||
|
OFF = "off"
|
||||||
|
AUTO = "auto"
|
||||||
|
LOW = "low"
|
||||||
|
MEDIUM = "medium"
|
||||||
|
HIGH = "high"
|
||||||
|
TOP = "top"
|
||||||
|
MIDDLE = "middle"
|
||||||
|
FOCUS = "focus"
|
||||||
|
DIFFUSE = "diffuse"
|
||||||
|
|
||||||
|
|
||||||
|
# These FAN_* constants are deprecated as of Home Assistant 2022.10.
|
||||||
|
# Please use the Preset enum instead.
|
||||||
FAN_ON = "on"
|
FAN_ON = "on"
|
||||||
FAN_OFF = "off"
|
FAN_OFF = "off"
|
||||||
FAN_AUTO = "auto"
|
FAN_AUTO = "auto"
|
||||||
@@ -79,7 +112,18 @@ FAN_FOCUS = "focus"
|
|||||||
FAN_DIFFUSE = "diffuse"
|
FAN_DIFFUSE = "diffuse"
|
||||||
|
|
||||||
|
|
||||||
# Possible swing state
|
class SwingState(StrEnum):
|
||||||
|
"""Swing state for climate devices."""
|
||||||
|
|
||||||
|
ON = "on"
|
||||||
|
OFF = "off"
|
||||||
|
BOTH = "both"
|
||||||
|
VERTICAL = "vertical"
|
||||||
|
HORIZONTAL = "horizontal"
|
||||||
|
|
||||||
|
|
||||||
|
# These SWING_* constants are deprecated as of Home Assistant 2022.10.
|
||||||
|
# Please use the Preset enum instead.
|
||||||
SWING_ON = "on"
|
SWING_ON = "on"
|
||||||
SWING_OFF = "off"
|
SWING_OFF = "off"
|
||||||
SWING_BOTH = "both"
|
SWING_BOTH = "both"
|
||||||
|
Reference in New Issue
Block a user