Fix schema for zwave_js WS API (#66052)

This commit is contained in:
Raman Gupta 2022-02-08 00:53:48 -05:00 committed by GitHub
parent 895aee3fb2
commit 4076ca9641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -133,6 +133,7 @@ APPLICATION_VERSION = "application_version"
MAX_INCLUSION_REQUEST_INTERVAL = "max_inclusion_request_interval"
UUID = "uuid"
SUPPORTED_PROTOCOLS = "supported_protocols"
ADDITIONAL_PROPERTIES = "additional_properties"
FEATURE = "feature"
UNPROVISION = "unprovision"
@ -170,6 +171,7 @@ def convert_qr_provisioning_information(info: dict) -> QRProvisioningInformation
max_inclusion_request_interval=info.get(MAX_INCLUSION_REQUEST_INTERVAL),
uuid=info.get(UUID),
supported_protocols=protocols if protocols else None,
additional_properties=info.get(ADDITIONAL_PROPERTIES, {}),
)
return info
@ -212,6 +214,7 @@ QR_PROVISIONING_INFORMATION_SCHEMA = vol.All(
cv.ensure_list,
[vol.Coerce(Protocols)],
),
vol.Optional(ADDITIONAL_PROPERTIES): dict,
}
),
convert_qr_provisioning_information,