mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
Add command SetOption72
Add command SetOption72 0/1 to switch between software (0) or hardware (1) energy total counter (#6561)
This commit is contained in:
parent
ec9fa4f430
commit
dea8f03459
@ -3,6 +3,7 @@
|
||||
* Change command PulseTime JSON message format and allow display of all pulsetimer information (#6519)
|
||||
* Add support for Chint DDSU666 Modbus energy meter by Pablo Zerón
|
||||
* Add support for SM2135 as used in Action LSC Smart Led E14 (#6495)
|
||||
* Add command SetOption72 0/1 to switch between software (0) or hardware (1) energy total counter (#6561)
|
||||
*
|
||||
* 6.6.0.14 20190925
|
||||
* Change command Tariffx to allow time entries like 23 (hours), 1320 (minutes) or 23:00. NOTE: As this is development branch previous tariffs are lost! (#6488)
|
||||
|
@ -199,7 +199,7 @@ void EnergyUpdateTotal(float value, bool kwh)
|
||||
Energy.kWhtoday = (unsigned long)((value - Energy.start_energy) * multiplier);
|
||||
}
|
||||
|
||||
if (Energy.total < (value - 0.01) && Settings.flag3.hardware_energy_total){ // We subtract a little offset to avoid continuous updates
|
||||
if ((Energy.total < (value - 0.01)) && Settings.flag3.hardware_energy_total) { // We subtract a little offset to avoid continuous updates
|
||||
RtcSettings.energy_kWhtotal = (unsigned long)((value * multiplier) - Energy.kWhtoday_offset - Energy.kWhtoday);
|
||||
Settings.energy_kWhtotal = RtcSettings.energy_kWhtotal;
|
||||
Energy.total = (float)(RtcSettings.energy_kWhtotal + Energy.kWhtoday_offset + Energy.kWhtoday) / 100000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user