Skip to content

Commit

Permalink
Update hvac.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Noltari committed Oct 26, 2023
1 parent 3d3ea7d commit 0af0e9c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions sim/hvac.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ async def post(self, data: dict[str, Any]) -> Any:
async def put(self, data: dict[str, Any]) -> Any:
"""PUT Local API ACS."""
keys = data.keys() + [API_SYSTEM_ID]

acs_on = data.get(API_ACS_ON)
if acs_on is not None:
self.on = bool(acs_on)

acs_power = data.get(API_ACS_POWER_MODE)
if acs_power is not None:
self.power = bool(acs_power)

acs_temp_set = data.get(API_ACS_SET_POINT)
if acs_temp_set is not None:
self.temp_set = int(acs_temp_set)

return api_json_response(api_filter_dict(self.data(), keys))


Expand Down Expand Up @@ -150,8 +163,7 @@ def post(self, data: dict[str, Any]) -> Any:

def put(self, data: dict[str, Any]) -> Any:
"""PUT Local API System."""
keys = data.keys() + [API_SYSTEM_ID]
return api_filter_dict(self.data(), keys)
return self.data()


class AirzoneZone:
Expand Down

0 comments on commit 0af0e9c

Please sign in to comment.