Options fix (#28)

* Fix options checking

---------

Co-authored-by: Meatballs1 <ben.campbell@withsecure.com>
This commit is contained in:
Ben Campbell
2024-03-20 23:16:17 +00:00
committed by GitHub
parent 6bf8b540ed
commit 11bbb5cf5b

View File

@@ -119,10 +119,11 @@ class HCDevice:
)
if "options" in data:
for option_uid in data["options"]:
for option in data["options"]:
option_uid = option["uid"]
if str(option_uid) not in self.features:
raise ValueError(
f"Unable to configure appliance. Option UID {uid} is not"
f"Unable to configure appliance. Option UID {option_uid} is not"
" valid for this device."
)