Skip to content

Commit

Permalink
Reset e day at midnight when offline (ref #21)
Browse files Browse the repository at this point in the history
  • Loading branch information
jantenhove committed Aug 12, 2019
1 parent f8794d2 commit e50bb78
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion GoodWeCommunicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ void GoodWeCommunicator::checkOfflineInverters()
sendRemoveRegistration(inverters[index].address); //send in case the inverter thinks we are online
}
inverters[index].isOnline = newOnline;
}
}
else
{
//offline inverter. Reset eday at midnight
if (inverters[index].eDay > 0 && timeClient.getMinutes == 0 && timeClient.getHours == 0)
inverters[index].eDay = 0;
}
}
}

Expand Down

0 comments on commit e50bb78

Please sign in to comment.