Skip to content

Commit

Permalink
Merge branch 'PM_onDemand' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
helgeerbe committed Jun 14, 2023
2 parents ceb2803 + da7628d commit 080a3eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PowerMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ void PowerMeterClass::onMqttMessage(const espMqttClientTypes::MessageProperties&
float PowerMeterClass::getPowerTotal()
{
CONFIG_T& config = Configuration.get();
if (!config.PowerMeter_Enabled
|| (millis() - _lastPowerMeterUpdate) < (1000)) {
if (config.PowerMeter_Enabled
&& (millis() - _lastPowerMeterUpdate) < (1000)) {
readPowerMeter();
}
return _powerMeter1Power + _powerMeter2Power + _powerMeter3Power;
Expand Down

0 comments on commit 080a3eb

Please sign in to comment.