diff --git a/homeassistant/components/climate/const.py b/homeassistant/components/climate/const.py index 202da1af597..fbea09e0bd6 100644 --- a/homeassistant/components/climate/const.py +++ b/homeassistant/components/climate/const.py @@ -42,31 +42,64 @@ HVAC_MODE_DRY = "dry" HVAC_MODE_FAN_ONLY = "fan_only" HVAC_MODES = [cls.value for cls in HVACMode] -# No preset is active + +class Preset(StrEnum): + """Preset for climate devices.""" + + # No preset is active + NONE = "none" + + # Device is running an energy-saving mode + ECO = "eco" + + # Device is in away mode + AWAY = "away" + + # Device turn all valve full up + BOOST = "boost" + + # Device is in comfort mode + COMFORT = "comfort" + + # Device is in home mode + HOME = "home" + + # Device is prepared for sleep + SLEEP = "sleep" + + # 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" - -# Device is running an energy-saving mode PRESET_ECO = "eco" - -# Device is in away mode PRESET_AWAY = "away" - -# Device turn all valve full up PRESET_BOOST = "boost" - -# Device is in comfort mode PRESET_COMFORT = "comfort" - -# Device is in home mode PRESET_HOME = "home" - -# Device is prepared for sleep PRESET_SLEEP = "sleep" - -# Device is reacting to activity (e.g. movement sensors) 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_OFF = "off" FAN_AUTO = "auto" @@ -79,7 +112,18 @@ FAN_FOCUS = "focus" 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_OFF = "off" SWING_BOTH = "both"