1 """Support for Atlantic Pass APC Heat Pump Main Component."""
3 from __future__
import annotations
5 from asyncio
import sleep
6 from typing
import cast
8 from pyoverkiz.enums
import OverkizCommand, OverkizCommandParam, OverkizState
17 from ..const
import DOMAIN
18 from ..entity
import OverkizEntity
20 OVERKIZ_TO_HVAC_MODES: dict[str, HVACMode] = {
21 OverkizCommandParam.STOP: HVACMode.OFF,
22 OverkizCommandParam.HEATING: HVACMode.HEAT,
23 OverkizCommandParam.COOLING: HVACMode.COOL,
26 HVAC_MODES_TO_OVERKIZ = {v: k
for k, v
in OVERKIZ_TO_HVAC_MODES.items()}
30 """Representation of Atlantic Pass APC Heat Pump Main Component.
32 This component can only turn off the heating pump and select the working mode: heating or cooling.
33 To set new temperatures, they must be selected individually per Zones (ie: AtlanticPassAPCHeatingAndCoolingZone).
34 Once the Device is switched on into heating or cooling mode, the Heat Pump will be activated and will use
35 the default temperature configuration for each available zone.
38 _attr_hvac_modes = [*HVAC_MODES_TO_OVERKIZ]
39 _attr_supported_features = (
40 ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
42 _attr_temperature_unit = UnitOfTemperature.CELSIUS
43 _attr_translation_key = DOMAIN
44 _enable_turn_on_off_backwards_compatibility =
False
48 """Return hvac current mode: stop, cooling, heating."""
49 return OVERKIZ_TO_HVAC_MODES[
51 str, self.
executorexecutor.select_state(OverkizState.IO_PASS_APC_OPERATING_MODE)
56 """Set new target hvac mode: stop, cooling, heating."""
59 await self.
executorexecutor.async_execute_command(
60 OverkizCommand.SET_PASS_APC_OPERATING_MODE,
61 HVAC_MODES_TO_OVERKIZ[hvac_mode],
None async_set_hvac_mode(self, HVACMode hvac_mode)