@@ -385,7 +385,7 @@ async def set_hysteresis_humidity_upper_bound(self, upper_bound: float) -> bool:
385385 )
386386 if upper_bound < 1 or upper_bound > 99 :
387387 raise ValueError (
388- f"Invalid humidity upper bound { upper_bound } . It must be between 1 and 99 percent ."
388+ f"Invalid humidity upper bound { upper_bound } . It must be between 1 and 99 % ."
389389 )
390390 if (
391391 self ._hysteresis_config .humidity_lower_bound is not None
@@ -417,7 +417,7 @@ async def set_hysteresis_humidity_lower_bound(self, lower_bound: float) -> bool:
417417 )
418418 if lower_bound < 1 or lower_bound > 99 :
419419 raise ValueError (
420- f"Invalid humidity lower bound { lower_bound } . It must be between 1 and 99 percent ."
420+ f"Invalid humidity lower bound { lower_bound } . It must be between 1 and 99 % ."
421421 )
422422 if (
423423 self ._hysteresis_config .humidity_upper_bound is not None
@@ -491,7 +491,7 @@ async def set_hysteresis_temperature_upper_bound(self, upper_bound: float) -> bo
491491 )
492492 if upper_bound < 1 or upper_bound > 60 :
493493 raise ValueError (
494- f"Invalid temperature upper bound { upper_bound } . It must be between 1 and 60 degrees ."
494+ f"Invalid temperature upper bound { upper_bound } . It must be between 1 and 60 °C ."
495495 )
496496 if (
497497 self ._hysteresis_config .temperature_lower_bound is not None
@@ -523,7 +523,7 @@ async def set_hysteresis_temperature_lower_bound(self, lower_bound: float) -> bo
523523 )
524524 if lower_bound < 1 or lower_bound > 60 :
525525 raise ValueError (
526- f"Invalid temperature lower bound { lower_bound } . It must be between 1 and 60 degrees ."
526+ f"Invalid temperature lower bound { lower_bound } . It must be between 1 and 60 °C ."
527527 )
528528 if (
529529 self ._hysteresis_config .temperature_upper_bound is not None
@@ -543,7 +543,7 @@ async def set_hysteresis_temperature_lower_bound(self, lower_bound: float) -> bo
543543 return True
544544
545545 async def set_hysteresis_temperature_direction (self , state : bool ) -> bool :
546- """Configure humitidy hysteresis to switch on or off on increase or decreasing direction.
546+ """Configure temperature hysteresis to switch on or off on increase or decreasing direction.
547547
548548 Configuration request will be queued and will be applied the next time when node is awake for maintenance.
549549 """
@@ -596,7 +596,7 @@ async def _hysteresis_state_update(
596596 )
597597 if switch_group == 1 :
598598 self ._sense_statistics .temperature_state = switch_state
599- if switch_group == 2 :
599+ elif switch_group == 2 :
600600 self ._sense_statistics .humidity_state = switch_state
601601
602602 await self .publish_feature_update_to_subscribers (
@@ -656,7 +656,7 @@ async def _configure_sense_humidity_task(self) -> bool:
656656 """Configure Sense humidity hysteresis device settings. Returns True if successful."""
657657 if not self ._hysteresis_config .dirty :
658658 return True
659- # Set value to -1 for disabled
659+ # Set value to -1% for ' disabled' (humidity):2621
660660 humidity_lower_bound = 2621
661661 humidity_upper_bound = 2621
662662 if self .humidity_enabled :
@@ -710,7 +710,7 @@ async def _configure_sense_temperature_task(self) -> bool:
710710 """Configure Sense temperature hysteresis device settings. Returns True if successful."""
711711 if not self ._hysteresis_config .dirty :
712712 return True
713- # Set value to -1 for disabled
713+ # Set value to -1 °C for disabled (temperature): 17099
714714 temperature_lower_bound = 17099
715715 temperature_upper_bound = 17099
716716 if self .temperature_enabled :
0 commit comments