Set threephase when applying OBIS codes

This commit is contained in:
Gunnar Skjold
2024-06-09 10:21:55 +02:00
parent 099b23d2d5
commit 8424d1f75e

View File

@@ -259,6 +259,10 @@ void AmsData::apply(OBIS_code_t obis, double value) {
}
if(listType > 0)
lastUpdateMillis = millis();
threePhase = l1voltage > 0 && l2voltage > 0 && l3voltage > 0;
if(!threePhase)
twoPhase = (l1voltage > 0 && l2voltage > 0) || (l2voltage > 0 && l3voltage > 0) || (l3voltage > 0 && l1voltage > 0);
}
uint64_t AmsData::getLastUpdateMillis() {