1 """Support for Atlantic Pass APC DHW."""
3 from typing
import Any, cast
5 from pyoverkiz.enums
import OverkizCommand, OverkizCommandParam, OverkizState
13 WaterHeaterEntityFeature,
17 from ..entity
import OverkizEntity
21 """Representation of Atlantic Pass APC DHW."""
23 _attr_temperature_unit = UnitOfTemperature.CELSIUS
24 _attr_supported_features = (
25 WaterHeaterEntityFeature.TARGET_TEMPERATURE
26 | WaterHeaterEntityFeature.OPERATION_MODE
27 | WaterHeaterEntityFeature.AWAY_MODE
29 _attr_operation_list = [STATE_OFF, STATE_HEAT_PUMP, STATE_PERFORMANCE]
33 """Return the temperature corresponding to the PRESET."""
38 OverkizState.CORE_COMFORT_TARGET_DWH_TEMPERATURE
46 OverkizState.CORE_ECO_TARGET_DWH_TEMPERATURE
52 self.
executorexecutor.select_state(OverkizState.CORE_TARGET_DWH_TEMPERATURE),
56 """Set new temperature."""
57 temperature = kwargs[ATTR_TEMPERATURE]
60 await self.
executorexecutor.async_execute_command(
61 OverkizCommand.SET_ECO_TARGET_DHW_TEMPERATURE, temperature
63 await self.
executorexecutor.async_execute_command(
64 OverkizCommand.REFRESH_ECO_TARGET_DWH_TEMPERATURE
67 await self.
executorexecutor.async_execute_command(
68 OverkizCommand.SET_COMFORT_TARGET_DHW_TEMPERATURE, temperature
70 await self.
executorexecutor.async_execute_command(
71 OverkizCommand.REFRESH_COMFORT_TARGET_DWH_TEMPERATURE
73 await self.
executorexecutor.async_execute_command(
74 OverkizCommand.REFRESH_TARGET_DWH_TEMPERATURE
79 """Return true if boost mode is on."""
81 self.
executorexecutor.select_state(OverkizState.CORE_BOOST_ON_OFF)
82 == OverkizCommandParam.ON
87 """Return true if eco mode is on."""
89 self.
executorexecutor.select_state(OverkizState.IO_PASS_APCDWH_MODE)
90 == OverkizCommandParam.ECO
95 """Return true if away mode is on."""
97 self.
executorexecutor.select_state(OverkizState.CORE_DWH_ON_OFF)
98 == OverkizCommandParam.OFF
103 """Return current operation."""
105 return STATE_PERFORMANCE
110 return STATE_HEAT_PUMP
113 """Set new operation mode."""
114 boost_state = OverkizCommandParam.OFF
115 regular_state = OverkizCommandParam.OFF
116 if operation_mode == STATE_PERFORMANCE:
117 boost_state = OverkizCommandParam.ON
118 regular_state = OverkizCommandParam.ON
119 elif operation_mode == STATE_HEAT_PUMP:
120 regular_state = OverkizCommandParam.ON
122 await self.
executorexecutor.async_execute_command(
123 OverkizCommand.SET_BOOST_ON_OFF_STATE, boost_state
125 await self.
executorexecutor.async_execute_command(
126 OverkizCommand.SET_DHW_ON_OFF_STATE, regular_state
130 """Turn away mode on."""
131 await self.
executorexecutor.async_execute_command(
132 OverkizCommand.SET_BOOST_ON_OFF_STATE, OverkizCommandParam.OFF
134 await self.
executorexecutor.async_execute_command(
135 OverkizCommand.SET_DHW_ON_OFF_STATE, OverkizCommandParam.OFF
139 """Turn away mode off."""
140 await self.
executorexecutor.async_execute_command(
141 OverkizCommand.SET_BOOST_ON_OFF_STATE, OverkizCommandParam.OFF
143 await self.
executorexecutor.async_execute_command(
144 OverkizCommand.SET_DHW_ON_OFF_STATE, OverkizCommandParam.ON
None async_turn_away_mode_off(self)
None async_set_operation_mode(self, str operation_mode)
str current_operation(self)
bool is_eco_mode_on(self)
None async_set_temperature(self, **Any kwargs)
None async_turn_away_mode_on(self)
bool is_away_mode_on(self)
float target_temperature(self)
bool is_boost_mode_on(self)
bool|None is_away_mode_on(self)