Skip to content

Commit

Permalink
Merge pull request #67 from Necroneco/fix
Browse files Browse the repository at this point in the history
fix required_attrs check
  • Loading branch information
rxwen authored May 1, 2024
2 parents 487e06c + 4cffe89 commit d79962c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/terncy/core/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,13 @@ def setup_device(self, device_data: PhysicalDeviceData, svc_list: list[SvcData])
if svc_room := svc.get("room"):
if svc_room_name := self.room_data.get(svc_room):
suggested_area = svc_room_name
attrs = [a['attr'] for a in attributes]
descriptions = [
description
for description in PROFILES.get(profile)
if (
not description.required_attrs
or set(description.required_attrs).issubset(attributes)
or set(description.required_attrs).issubset(attrs)
)
]
if len(descriptions) > 0:
Expand Down

0 comments on commit d79962c

Please sign in to comment.