Skip to content

Commit

Permalink
Fix value convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
bastshoes committed Aug 28, 2019
1 parent 67b263f commit 51f16b5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion de_web_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6510,6 +6510,10 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
{
consumption *= 10; // 0.01 kWh = 10 Wh -> Wh
}
else if (i->modelId() == QLatin1String("RICI01")) // LifeControl smart plug
{
// Already in Wh
}

if (item)
{
Expand Down Expand Up @@ -6641,7 +6645,11 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
else if (i->modelId() == QLatin1String("SmartPlug")) // Heiman
{
current *= 10; // 0.01A -> mA
}
}
else if (i->modelId() == QLatin1String("RICI01")) //LifeControl Smart Plug
{
// already in mA
}
else
{
current *= 1000; // A -> mA
Expand Down

0 comments on commit 51f16b5

Please sign in to comment.