mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-13 10:58:02 +00:00
Return None instead of raising an exception on missing, valid emeter keys (#146)
Fixes #142 Also, update the pre-commit hooks to their newest versions
This commit is contained in:
@@ -87,7 +87,8 @@ class EmeterStatus(dict):
|
||||
if i.startswith(item):
|
||||
return self.__getitem__(i) / 1000
|
||||
|
||||
raise SmartDeviceException("Unable to find a value for '%s'" % item)
|
||||
_LOGGER.debug(f"Unable to find value for '{item}'")
|
||||
return None
|
||||
|
||||
|
||||
def requires_update(f):
|
||||
|
Reference in New Issue
Block a user