Add GJ (gigajoule) as an energy meter unit (#2114)

Some district heating meters are displaying their values in GJ and Home
Assistant is also capable of accepting heating values in this format.
This commit is contained in:
Attila Darazs
2023-03-04 18:31:32 +01:00
committed by GitHub
parent 827423023c
commit 4dc4752823
2 changed files with 4 additions and 0 deletions

View File

@@ -156,6 +156,9 @@ bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
else if (toUpper(splitted[1]) == "ENERGY_MWH") {
mqttServer_setMeterType("energy", "MWh", "h", "MW");
}
else if (toUpper(splitted[1]) == "ENERGY_GJ") {
mqttServer_setMeterType("energy", "GJ", "h", "GJ/h");
}
}
if ((toUpper(splitted[0]) == "CLIENTID") && (splitted.size() > 1))