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 25, 2023
1 parent 7c5076e commit 5b8fc35
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions sim/hvac.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def data(self) -> dict[str, Any]:
API_SYSTEM_ID: int(self.id),
}

def matches(self, system: int) -> bool:
def matches(self, system_id: int) -> bool:
"""Check if system matches param."""
matches = False
if system == 0 or system == self.system:
if system_id == 0 or system_id == 127 or system_id == self.id:
matches = True
return matches

Expand Down Expand Up @@ -154,18 +154,18 @@ def data(self) -> dict[str, Any]:
API_ZONE_ID: self.id,
}

def matches(self, system: int, zone: int) -> bool:
def matches(self, system_id: int, zone_id: int) -> bool:
"""Check if Zone matches params."""
matches = False
if system == 0:
if zone == 0:
if system_id == 0:
if zone_id == 0:
matches = True
elif zone == self.id:
elif zone_id == self.id:
matches = True
elif zone == 0:
if system == self.system:
elif zone_id == 0:
if system_id == self.system:
matches = True
elif system == self.system and zone == self.id:
elif system_id == self.system and zone_id == self.id:
matches = True
return matches

Expand Down

0 comments on commit 5b8fc35

Please sign in to comment.