From 1ccf1f383ce3270e51abed5d3784a2c15f2af087 Mon Sep 17 00:00:00 2001 From: Andreas Zimnas Date: Wed, 9 Oct 2024 16:36:18 +0300 Subject: [PATCH] power consumption improvements --- package.json | 2 +- src/utils/l530.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index faa5ebc..3981342 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "displayName": "Tapo P100 Plugin", "name": "homebridge-tapo", "type": "module", - "version": "1.5.2-beta2", + "version": "1.5.2-beta5", "description": "Homebridge Plugin for TP-Link Tapo P100 Plugs", "license": "Apache-2.0", "homepage": "https://github.com/apatsufas/homebridge-tapo-p100#readme", diff --git a/src/utils/l530.ts b/src/utils/l530.ts index 94863aa..e9ca031 100644 --- a/src/utils/l530.ts +++ b/src/utils/l530.ts @@ -125,6 +125,12 @@ export default class L530 extends L520E { } public getPowerConsumption():ConsumptionInfo{ + if(!this.getSysInfo().device_on){ + return { + total: this._consumption.total, + current: 0, + }; + } return this._consumption; }