Merge PR #621: Shelly: Fix total energy consumed for 1 Plus PM
commit
a305c2380e
|
|
@ -1621,7 +1621,7 @@ void IntegrationPluginShelly::setupGen2(ThingSetupInfo *info)
|
|||
thing->setStateValue("currentPower", switch0.value("apower").toDouble());
|
||||
}
|
||||
if (switch0.contains("aenergy") && thing->hasState("totalEnergyConsumed")) {
|
||||
thing->setStateValue("totalEnergyConsumed", notification.value("switch:0").toMap().value("aenergy").toMap().value("total").toDouble());
|
||||
thing->setStateValue("totalEnergyConsumed", notification.value("switch:0").toMap().value("aenergy").toMap().value("total").toDouble() / 1000);
|
||||
}
|
||||
if (switch0.contains("output") && thing->hasState("power")) {
|
||||
thing->setStateValue("power", switch0.value("output").toBool());
|
||||
|
|
|
|||
Loading…
Reference in New Issue