Fix unifiprotect with python 3.11 (#88101)

There are some breaking changes to Enum https://blog.pecar.me/python-enum

needs https://github.com/AngellusMortis/pyunifiprotect/pull/263 but
does not need to be in this PR
This commit is contained in:
J. Nick Koston 2023-02-14 10:26:14 -06:00 committed by GitHub
parent 95476f46c2
commit 3e8a6cb3b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,7 +135,7 @@ def _get_doorbell_options(api: ProtectApiClient) -> list[dict[str, Any]]:
for item in messages:
msg_type = item.type.value
if item.type == DoorbellMessageType.CUSTOM_MESSAGE:
msg_type = f"{DoorbellMessageType.CUSTOM_MESSAGE}:{item.text}"
msg_type = f"{DoorbellMessageType.CUSTOM_MESSAGE.value}:{item.text}"
built_messages.append({"id": msg_type, "name": item.text})