Avoid constructing unifiprotect enabled callable when unused (#120074)

This commit is contained in:
J. Nick Koston 2024-06-21 04:58:45 -05:00 committed by GitHub
parent c8ce935ec7
commit 15e52de7e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,7 +46,7 @@ class ProtectEntityDescription(EntityDescription, Generic[T]):
# The below are set in __post_init__ # The below are set in __post_init__
has_required: Callable[[T], bool] = bool has_required: Callable[[T], bool] = bool
get_ufp_enabled: Callable[[T], bool] = bool get_ufp_enabled: Callable[[T], bool] | None = None
def get_ufp_value(self, obj: T) -> Any: def get_ufp_value(self, obj: T) -> Any:
"""Return value from UniFi Protect device; overridden in __post_init__.""" """Return value from UniFi Protect device; overridden in __post_init__."""