mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-04 23:26:17 +00:00
Only report realtime data on MQTT if EnergyAccounting is initialized
This commit is contained in:
@@ -52,6 +52,7 @@ public:
|
||||
bool update(AmsData* amsData);
|
||||
bool load();
|
||||
bool save();
|
||||
bool isInitialized();
|
||||
|
||||
double getUseThisHour();
|
||||
double getUseToday();
|
||||
|
||||
@@ -26,6 +26,10 @@ void EnergyAccounting::setTimezone(Timezone* tz) {
|
||||
this->tz = tz;
|
||||
}
|
||||
|
||||
bool EnergyAccounting::isInitialized() {
|
||||
return this->init;
|
||||
}
|
||||
|
||||
bool EnergyAccounting::update(AmsData* amsData) {
|
||||
if(config == NULL) return false;
|
||||
time_t now = time(nullptr);
|
||||
|
||||
Reference in New Issue
Block a user