Skip to content

Commit

Permalink
refact: code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
noahhusby committed Aug 12, 2024
1 parent 44a5d7f commit a62e085
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aiorussound/rio.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _store_cached_variable(self, device_str: str, key: str, value: str):
for controller in self._controllers.values():
for zone in controller.zones.values():
source = zone.fetch_current_source()
if source and source.device_str() is device_str:
if source and source.device_str() == device_str:
for callback in self._callbacks.get(zone.device_str(), []):
callback(device_str, key, value)

Expand Down
4 changes: 2 additions & 2 deletions aiorussound/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def source_device_str(source_id: int) -> str:


def get_max_zones(model: str) -> int:
if model is 'MCA-88' or 'MCA-88X' or 'MCA-C5':
if model in ('MCA-88', 'MCA-88X', 'MCA-C5'):
return 8
elif model is 'MCA-66' or 'MCA-C3':
elif model in ('MCA-66', 'MCA-C3'):
return 6
else:
return 1

0 comments on commit a62e085

Please sign in to comment.