mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-11 18:08:02 +00:00
Update config to_dict to exclude credentials if the hash is empty string (#626)
* Update config to_dict to exclude credentials if the hash is empty string * Add test
This commit is contained in:
@@ -165,7 +165,7 @@ class DeviceConfig:
|
||||
exclude_credentials: bool = False,
|
||||
) -> Dict[str, Dict[str, str]]:
|
||||
"""Convert device config to dict."""
|
||||
if credentials_hash or exclude_credentials:
|
||||
if credentials_hash is not None or exclude_credentials:
|
||||
self.credentials = None
|
||||
if credentials_hash:
|
||||
self.credentials_hash = credentials_hash
|
||||
|
Reference in New Issue
Block a user