Fix credential hash to return None on empty credentials (#1029)

If discovery is triggered without credentials and discovers devices requiring authentication,
blank credentials are used to initialise the protocols and no connection is actually made.
In this instance we should not return the credentials_hash for blank credentials as it will be invalid.
This commit is contained in:
Steven B
2024-07-02 13:43:37 +01:00
committed by GitHub
parent e5b959e4a9
commit b8a87f1c57
6 changed files with 74 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ class BaseTransport(ABC):
@property
@abstractmethod
def credentials_hash(self) -> str:
def credentials_hash(self) -> str | None:
"""The hashed credentials used by the transport."""
@abstractmethod