Skip to content

Commit

Permalink
Fix HVACAction code
Browse files Browse the repository at this point in the history
  • Loading branch information
jvitkauskas committed Dec 20, 2023
1 parent 17f0274 commit df8a164
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions pybls21/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,13 @@ async def _poll(self) -> ClimateDevice:
else HVACAction.FAN
if operation_mode == 0
else HVACAction.HEATING
if (
operation_mode == 1
or (temp_before_heating_x10 < temp_after_heating_x10)
)
if operation_mode == 1
else HVACAction.COOLING
if operation_mode == 2
else HVACAction.HEATING
if temp_before_heating_x10 < temp_after_heating_x10
else HVACAction.COOLING
if (
operation_mode == 2
or (temp_before_heating_x10 > temp_after_heating_x10)
)
if temp_before_heating_x10 > temp_after_heating_x10
else HVACAction.IDLE,
hvac_modes=[
HVACMode.OFF,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pybls21",
version="4.0.1",
version="4.0.2",
author="Julius Vitkauskas",
author_email="[email protected]",
description="An api allowing control of AC state (temperature, on/off, speed) of an Blauberg S21 device locally over TCP",
Expand Down

0 comments on commit df8a164

Please sign in to comment.