Skip to content

Commit

Permalink
Fix include keys match
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Jan 15, 2024
1 parent aea1906 commit 0188809
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/yandex_station/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ def device_include(
if item == device["name"]:
return {"name": item}
elif isinstance(item, dict):
if all(item[k] == device.get(k) for k in INCLUDE_KEYS if k in item):
# one and more INCLUDE_KEYS should match
if sum(item[k] == device.get(k) for k in INCLUDE_KEYS if k in item):
return item

return None
Expand Down

0 comments on commit 0188809

Please sign in to comment.