from enum import StrEnum ATTR_TARGET_TEMP_LOW = "target_temp_low" ATTR_TARGET_TEMP_HIGH = "target_temp_high" ATTR_TEMPERATURE = "temperature" class HVACMode(StrEnum): """HVAC mode for climate devices.""" # All activity disabled / Device is off/standby OFF = "off" # Heating HEAT = "heat" # Cooling COOL = "cool" # The device supports heating/cooling to a range HEAT_COOL = "heat_cool" # The temperature is set based on a schedule, learned behavior, AI or some # other related mechanism. User is not able to adjust the temperature AUTO = "auto" # Device is in Dry/Humidity mode DRY = "dry" # Only the fan is on, not fan and another mode like cool FAN_ONLY = "fan_only" class UnitOfTemperature(StrEnum): """Temperature units.""" CELSIUS = "°C" FAHRENHEIT = "°F" CIELO_TO_HA = { "cool": HVACMode.COOL, "heat": HVACMode.HEAT, "fan": HVACMode.FAN_ONLY, "dry": HVACMode.DRY, "auto": HVACMode.AUTO, "heat_cool": HVACMode.HEAT_COOL, "off": HVACMode.OFF, } AVAILABLE_FAN_MODES = { "low", "medium", "high", "auto", } AVAILABLE_SWING_MODES = { "auto", "pos1", "pos2", "pos3", "pos4", "pos5", "pos6", "pos7", "pos8", "pos9", "adjust", "auto/stop", "swing", } AVAILABLE_PRESETS_MODES = {"Home", "Away", "Sleep"} CIELO_TO_HA = { "cool": HVACMode.COOL, "heat": HVACMode.HEAT, "fan": HVACMode.FAN_ONLY, "dry": HVACMode.DRY, "auto": HVACMode.AUTO, "heat_cool": HVACMode.HEAT_COOL, "off": HVACMode.OFF, } CIELO_SCREEN_LESS_TO_HA = { "auto": HVACMode.AUTO, "cool": HVACMode.COOL, "heat": HVACMode.HEAT, "fan": HVACMode.FAN_ONLY, "dry": HVACMode.DRY, "mode": HVACMode.AUTO, "off": HVACMode.OFF, } HA_TO_CIELO = {v: k for k, v in CIELO_TO_HA.items()}