mirror of https://github.com/arendst/Tasmota.git
Merge pull request #11563 from hallard/teleinfo
Teleinfo device driver: Always update total energy
This commit is contained in:
commit
34a41ebbc9
|
@ -21,9 +21,11 @@ All notable changes to this project will be documented in this file.
|
|||
- ESP32 core library from v1.0.5 to v1.0.6
|
||||
- Limit number of relay/button columns in GUI to 8 (#11546)
|
||||
- ADC range result from int to float using command ``FreqRes`` for decimal resolution selection (#11545)
|
||||
- Teleinfo, if raw mode selected also return telemety values in SENSOR data
|
||||
|
||||
### Fixed
|
||||
- HC-SR04 on ESP32 release serial interface if not used (#11507)
|
||||
- Teleinfo, if raw mode selected also always update total energy calculations
|
||||
|
||||
## [9.3.1.1]
|
||||
### Added
|
||||
|
|
|
@ -233,6 +233,7 @@ void DataCallback(struct _ValueList * me, uint8_t flags)
|
|||
// Current I
|
||||
else if (ilabel == LABEL_IINST || ilabel == LABEL_IRMS1)
|
||||
{
|
||||
Energy.current_available = true;
|
||||
Energy.current[0] = (float) atoi(me->value);
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: Current %s, now %d"), me->value, (int) Energy.current[0]);
|
||||
}
|
||||
|
@ -276,18 +277,14 @@ void DataCallback(struct _ValueList * me, uint8_t flags)
|
|||
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: HC:%u HP:%u Total:%u"), hc, hp, total);
|
||||
}
|
||||
|
||||
if (!Settings.flag4.teleinfo_rawdata) {
|
||||
EnergyUpdateTotal(total/1000.0f, true);
|
||||
}
|
||||
EnergyUpdateTotal(total/1000.0f, true);
|
||||
}
|
||||
|
||||
// Wh total index (standard)
|
||||
else if ( ilabel == LABEL_EAST)
|
||||
{
|
||||
uint32_t total = atoi(me->value);
|
||||
if (!Settings.flag4.teleinfo_rawdata) {
|
||||
EnergyUpdateTotal(total/1000.0f, true);
|
||||
}
|
||||
EnergyUpdateTotal(total/1000.0f, true);
|
||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: Total:%uWh"), total);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue