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 f0954d6 commit 3d3ea7d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sim/hvac.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from aiohttp import web
from helpers import api_json_error, api_json_response

from aioairzone.common import SystemType, TemperatureUnit, get_system_zone_id
from aioairzone.common import SystemType, TemperatureUnit, api_filter_dict, get_system_zone_id
from aioairzone.const import (
API_ACS_MAX_TEMP,
API_ACS_MIN_TEMP,
Expand Down Expand Up @@ -102,7 +102,8 @@ async def post(self, data: dict[str, Any]) -> Any:

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


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

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


class AirzoneZone:
Expand Down Expand Up @@ -196,7 +198,8 @@ def post(self, data: dict[str, Any]) -> Any:

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


class AirzoneHVAC:
Expand Down

0 comments on commit 3d3ea7d

Please sign in to comment.