mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-02 15:37:42 +00:00
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:
parent
db05d920cf
commit
4391aa07fe
@ -347,9 +347,11 @@ void SDM120Show(bool json)
|
|||||||
#endif // USE_SDM220
|
#endif // USE_SDM220
|
||||||
#ifdef USE_DOMOTICZ
|
#ifdef USE_DOMOTICZ
|
||||||
if (0 == tele_period) {
|
if (0 == tele_period) {
|
||||||
|
char energy_total_chr[33];
|
||||||
|
dtostrfd(sdm120_energy_total * 1000, 1, energy_total_chr);
|
||||||
DomoticzSensor(DZ_VOLTAGE, voltage);
|
DomoticzSensor(DZ_VOLTAGE, voltage);
|
||||||
DomoticzSensor(DZ_CURRENT, current);
|
DomoticzSensor(DZ_CURRENT, current);
|
||||||
DomoticzSensorPowerEnergy((int)sdm120_active_power, energy_total);
|
DomoticzSensorPowerEnergy((int)sdm120_active_power, energy_total_chr);
|
||||||
}
|
}
|
||||||
#endif // USE_DOMOTICZ
|
#endif // USE_DOMOTICZ
|
||||||
#ifdef USE_WEBSERVER
|
#ifdef USE_WEBSERVER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user