Merge branch 'main' into set_multiple_values
This commit is contained in:
@@ -120,10 +120,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."
|
||||
)
|
||||
|
||||
@@ -165,8 +166,8 @@ class HCDevice:
|
||||
if "values" in feature:
|
||||
if isinstance(data["value"], int) is False:
|
||||
raise Exception(
|
||||
f"Unable to configure appliance. The value {data['value']} must"
|
||||
f" be an integer. Allowed values are {feature['values']}."
|
||||
f"Unable to configure appliance. The value {data['value']} must be an integer."
|
||||
f" Allowed values are {feature['values']}."
|
||||
)
|
||||
value = str(data["value"])
|
||||
# values are strings in the feature list,
|
||||
|
||||
Reference in New Issue
Block a user