Fix SDM120 Energy Value to Domoticz

Fix SDM120 Energy Value to Domoticz (https://github.com/arendst/Sonoff-Tasmota/issues/6015)
This commit is contained in:
Adrian Scillato 2019-07-03 18:56:06 -03:00 committed by GitHub
parent db05d920cf
commit 4391aa07fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -347,9 +347,11 @@ void SDM120Show(bool json)
#endif // USE_SDM220
#ifdef USE_DOMOTICZ
if (0 == tele_period) {
char energy_total_chr[33];
dtostrfd(sdm120_energy_total * 1000, 1, energy_total_chr);
DomoticzSensor(DZ_VOLTAGE, voltage);
DomoticzSensor(DZ_CURRENT, current);
DomoticzSensorPowerEnergy((int)sdm120_active_power, energy_total);
DomoticzSensorPowerEnergy((int)sdm120_active_power, energy_total_chr);
}
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER