mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
multiply by 1000 instead of 10^3
This commit is contained in:
parent
8d1e0acbba
commit
624c44c27f
@ -70,11 +70,11 @@ class EmeterStatus(dict):
|
||||
if item not in valid_keys:
|
||||
raise KeyError(item)
|
||||
if "_" in item: # upscale
|
||||
return super().__getitem__(item[: item.find("_")]) * 10 ** 3
|
||||
return super().__getitem__(item[: item.find("_")]) * 1000
|
||||
else: # downscale
|
||||
for i in super().keys():
|
||||
if i.startswith(item):
|
||||
return self.__getitem__(i) / 10 ** 3
|
||||
return self.__getitem__(i) / 1000
|
||||
|
||||
raise SmartDeviceException("Unable to find a value for '%s'" % item)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user