From 8783cb8ea6fb01c592b6821f0b99a1f623beb6c7 Mon Sep 17 00:00:00 2001 From: Black-Thunder <972581+Black-Thunder@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:00:04 +0100 Subject: [PATCH] ATW devices: fixed creation of report states --- lib/melcloudAtwDevice.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/melcloudAtwDevice.js b/lib/melcloudAtwDevice.js index 9eaea039..14110cf9 100644 --- a/lib/melcloudAtwDevice.js +++ b/lib/melcloudAtwDevice.js @@ -883,6 +883,22 @@ class MelcloudAtwDevice { }, native: {} }); + + gthat.extendObjectAsync(lastReportDataPrefix + commonDefines.CommonDeviceStateIDs.TotalPowerProductionPrefix, { + type: "state", + common: { + name: `Total power production for mode '${mode}'`, + type: "number", + role: "value.power.consumption", + min: 0, + read: true, + write: false, + unit: "kWh", + def: 0, + desc: `Total power production for mode '${mode}'` + }, + native: {} + }); }); gthat.extendObjectAsync(lastReportDataPrefix + commonDefines.CommonDeviceStateIDs.TotalPowerConsumptionPrefix, {