|
@@ -33,6 +33,8 @@ class ACATFUFanFreqController:
|
|
|
else:
|
|
|
next_freq_set = self.get_cooling_logic(spaces_params, on_flag)
|
|
|
|
|
|
+ next_freq_set = self.hcho_logic(spaces_params, next_freq_set)
|
|
|
+
|
|
|
next_freq_set = max(20.0, next_freq_set)
|
|
|
next_freq_set = min(50.0, next_freq_set)
|
|
|
except TypeError:
|
|
@@ -133,8 +135,9 @@ class ACATFUFanFreqController:
|
|
|
|
|
|
def get_heating_logic(self, spaces_params: List[SpaceATFU], on_flag: bool) -> float:
|
|
|
# The same with cooling logic.
|
|
|
+ freq_set = self.get_cooling_logic(spaces_params, on_flag)
|
|
|
|
|
|
- return self._freq
|
|
|
+ return freq_set
|
|
|
|
|
|
@staticmethod
|
|
|
def get_avg(spaces_params: List[SpaceATFU]) -> Tuple[float, float]:
|
|
@@ -173,6 +176,20 @@ class ACATFUFanFreqController:
|
|
|
|
|
|
return ratio
|
|
|
|
|
|
+ @staticmethod
|
|
|
+ def hcho_logic(spaces_params: List[SpaceATFU], next_freq_set: float) -> float:
|
|
|
+ diff = 0.0
|
|
|
+ for space in spaces_params:
|
|
|
+ if space.hcho >= 0.1:
|
|
|
+ diff = 5
|
|
|
+ break
|
|
|
+ elif space.hcho >= 0.08:
|
|
|
+ diff = 3
|
|
|
+ else:
|
|
|
+ diff = 0
|
|
|
+
|
|
|
+ return next_freq_set + diff
|
|
|
+
|
|
|
|
|
|
async def build_acatfu_freq_set(params: ACATFUFreqSetRequest) -> float:
|
|
|
controller = ACATFUFanFreqController(params.freq, params.fresh_air_temperature, params.season)
|