Skip to content

Commit

Permalink
Fix local energy query for SPM #1366
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 19, 2024
1 parent bb0e59b commit 0e334c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/sonoff/core/ewelink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ async def update_spm_pow(self, device: XDevice, cloud_mode: bool):
if cloud_mode:
await self.cloud.send(device, params, timeout=0)
else:
await self.local.send(device, params, command="statistics")
params["subDevId"] = device["deviceid"]
await self.local.send(device["parent"], params, command="statistics")

def can_cloud(self, device: XDevice) -> bool:
if not self.cloud.online:
Expand Down

0 comments on commit 0e334c5

Please sign in to comment.