8000 Check device_on exists for energy monitoring on smart devices · python-kasa/python-kasa@5ea87e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ea87e8

Browse files
committed
Check device_on exists for energy monitoring on smart devices
1 parent 6ae7f88 commit 5ea87e8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kasa/smart/modules/energy.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,4 @@ async def get_monthly_stats(self, *, year=None, kwh=True) -> dict:
115115
async def _check_supported(self):
116116
"""Additional check to see if the module is supported by the device."""
117117
# Energy module is not supported on P304M parent device
118-
return not (
119-
self._device.model == "P304M"
120-
and "original_device_id" not in self._device.sys_info
121-
)
118+
return "device_on" in self._device.sys_info

0 commit comments

Comments
 (0)
0