Fix default battery level

- Fix default battery level (#19160)
- Bump version to v13.0.0.3
This commit is contained in:
Theo Arends 2023-07-21 14:35:22 +02:00
parent 2cc0964a5f
commit b149443691
6 changed files with 36 additions and 21 deletions

View File

@ -3,28 +3,34 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - Development ## [Unreleased] - Development
## [13.0.0.2] ## [13.0.0.3]
### Added
### Breaking Changed
### Changed
### Fixed
- Initial battery level percentage (#19160)
### Removed
## [13.0.0.2] 20230721
### Added ### Added
- Partition Wizard is now able to convert to safeboot from Shelly partition layout (#19034) - Partition Wizard is now able to convert to safeboot from Shelly partition layout (#19034)
- Matter mini-profiler (#19075) - Matter mini-profiler (#19075)
- Berry `_class` can be used in `static var` initialization code (#19088) - Berry `_class` can be used in `static var` initialization code (#19088)
- Berry add `energy.update_total()` to call `EnergyUpdateTotal()` from energy driver - Berry `energy.update_total()` to call `EnergyUpdateTotal()` from energy driver
- Berry add metrics for memory allocation/deallocation/reallocation - Berry metrics for memory allocation/deallocation/reallocation
- Berry `tasmota.loglevel()` and `tasmota.rtc_utc()` for faster performance - Berry `tasmota.loglevel()` and `tasmota.rtc_utc()` for faster performance
- Berry add AES CCM decrypting in a single call to avoid any object allocation - Berry AES CCM decrypting in a single call to avoid any object allocation
### Breaking Changed
### Changed ### Changed
- ESP32 shutter driver support up to 16 shutters (#18295) - ESP32 shutter driver support up to 16 shutters (#18295)
- Configuration backup and restore now backup and restore ``.xdrvsetXXX`` files too (#18295) - Configuration backup and restore now backup and restore ``.xdrvsetXXX`` files too (#18295)
- Berry extend `range(lower, upper, incr)` to arbitrary increment - Berry extend `range(lower, upper, incr)` to arbitrary increment
- Berry updated syntax highlighting plugin for VSCode - Berry updated syntax highlighting plugin for VSCode
- Matter latency improvement for single attribute reads and single commands - Matter latency improvement for single attribute reads and single commands (#19158)
### Fixed
### Removed
## [13.0.0.1] 20230708 ## [13.0.0.1] 20230708
### Added ### Added

View File

@ -110,7 +110,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
[Complete list](BUILDS.md) of available feature and sensors. [Complete list](BUILDS.md) of available feature and sensors.
## Changelog v13.0.0.2 ## Changelog v13.0.0.3
### Added ### Added
- Command ``BrRestart`` to restart the Berry VM (experimental) [#19003](https://github.com/arendst/Tasmota/issues/19003) - Command ``BrRestart`` to restart the Berry VM (experimental) [#19003](https://github.com/arendst/Tasmota/issues/19003)
- Command ``Delay -1`` to wait until next second [#18984](https://github.com/arendst/Tasmota/issues/18984) - Command ``Delay -1`` to wait until next second [#18984](https://github.com/arendst/Tasmota/issues/18984)
@ -118,6 +118,10 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Support for SGP41 TVOC/NOx Sensor [#18880](https://github.com/arendst/Tasmota/issues/18880) - Support for SGP41 TVOC/NOx Sensor [#18880](https://github.com/arendst/Tasmota/issues/18880)
- Berry `getgbl` performance counter to `debug.counters()` [#19070](https://github.com/arendst/Tasmota/issues/19070) - Berry `getgbl` performance counter to `debug.counters()` [#19070](https://github.com/arendst/Tasmota/issues/19070)
- Berry `_class` can be used in `static var` initialization code [#19088](https://github.com/arendst/Tasmota/issues/19088) - Berry `_class` can be used in `static var` initialization code [#19088](https://github.com/arendst/Tasmota/issues/19088)
- Berry `energy.update_total()` to call `EnergyUpdateTotal()` from energy driver
- Berry metrics for memory allocation/deallocation/reallocation
- Berry `tasmota.loglevel()` and `tasmota.rtc_utc()` for faster performance
- Berry AES CCM decrypting in a single call to avoid any object allocation
- Partition Wizard is now able to convert to safeboot from Shelly partition layout [#19034](https://github.com/arendst/Tasmota/issues/19034) - Partition Wizard is now able to convert to safeboot from Shelly partition layout [#19034](https://github.com/arendst/Tasmota/issues/19034)
- Matter option to disable bridge mode [#18992](https://github.com/arendst/Tasmota/issues/18992) - Matter option to disable bridge mode [#18992](https://github.com/arendst/Tasmota/issues/18992)
- Matter mini-profiler [#19075](https://github.com/arendst/Tasmota/issues/19075) - Matter mini-profiler [#19075](https://github.com/arendst/Tasmota/issues/19075)
@ -130,9 +134,13 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- ESP32 LVGL library from v8.3.7 to v8.3.8 (no functional change) - ESP32 LVGL library from v8.3.7 to v8.3.8 (no functional change)
- Configuration backup and restore now backup and restore ``.xdrvsetXXX`` files too [#18295](https://github.com/arendst/Tasmota/issues/18295) - Configuration backup and restore now backup and restore ``.xdrvsetXXX`` files too [#18295](https://github.com/arendst/Tasmota/issues/18295)
- ESP32 shutter driver support up to 16 shutters [#18295](https://github.com/arendst/Tasmota/issues/18295) - ESP32 shutter driver support up to 16 shutters [#18295](https://github.com/arendst/Tasmota/issues/18295)
- Berry extend `range(lower, upper, incr)` to arbitrary increment
- Berry updated syntax highlighting plugin for VSCode
- Matter support for temperature in Fahrenheit (`SetOption8 1`) [#18987](https://github.com/arendst/Tasmota/issues/18987) - Matter support for temperature in Fahrenheit (`SetOption8 1`) [#18987](https://github.com/arendst/Tasmota/issues/18987)
- Matter improve responsiveness [#19002](https://github.com/arendst/Tasmota/issues/19002) - Matter improve responsiveness [#19002](https://github.com/arendst/Tasmota/issues/19002)
- Matter improve latency for remote commands [#19072](https://github.com/arendst/Tasmota/issues/19072) - Matter improve latency for remote commands [#19072](https://github.com/arendst/Tasmota/issues/19072)
- Matter improve latency for single attribute reads and single commands [#19158](https://github.com/arendst/Tasmota/issues/19072)
### Fixed ### Fixed
- Berry Walrus Operator [#18982](https://github.com/arendst/Tasmota/issues/18982) - Berry Walrus Operator [#18982](https://github.com/arendst/Tasmota/issues/18982)

View File

@ -20,6 +20,6 @@
#ifndef _TASMOTA_VERSION_H_ #ifndef _TASMOTA_VERSION_H_
#define _TASMOTA_VERSION_H_ #define _TASMOTA_VERSION_H_
const uint32_t VERSION = 0x0D000002; // 13.0.0.2 const uint32_t VERSION = 0x0D000003; // 13.0.0.2
#endif // _TASMOTA_VERSION_H_ #endif // _TASMOTA_VERSION_H_

View File

@ -1741,6 +1741,9 @@ void SettingsDelta(void) {
RtcSettings.energy_usage.last_usage_kWhtotal /= 100; RtcSettings.energy_usage.last_usage_kWhtotal /= 100;
#endif #endif
} }
if (Settings->version < 0x0D000003) { // 13.0.0.3
Settings->battery_level_percent = 101;
}
Settings->version = VERSION; Settings->version = VERSION;
SettingsSave(1); SettingsSave(1);

View File

@ -829,13 +829,11 @@ void MqttShowState(void)
ResponseAppendTime(); ResponseAppendTime();
ResponseAppend_P(PSTR(",\"" D_JSON_UPTIME "\":\"%s\",\"UptimeSec\":%u"), GetUptime().c_str(), UpTime()); ResponseAppend_P(PSTR(",\"" D_JSON_UPTIME "\":\"%s\",\"UptimeSec\":%u"), GetUptime().c_str(), UpTime());
// Battery Level expliciet for deepsleep devices // Battery Level expliciet for deepsleep devices
if (Settings->battery_level_percent != 101) { if (Settings->battery_level_percent != 101) {
ResponseAppend_P(PSTR(",\"" D_CMND_ZIGBEE_BATTPERCENT "\":%d"), Settings->battery_level_percent); ResponseAppend_P(PSTR(",\"" D_CMND_ZIGBEE_BATTPERCENT "\":%d"), Settings->battery_level_percent);
} }
#ifdef ESP8266 #ifdef ESP8266
#ifdef USE_ADC_VCC #ifdef USE_ADC_VCC
dtostrfd((double)ESP.getVcc()/1000, 3, stemp1); dtostrfd((double)ESP.getVcc()/1000, 3, stemp1);

View File

@ -201,8 +201,8 @@ void TasDiscoverMessage(void) {
Settings->flag5.fade_fixed_duration, Settings->flag5.fade_fixed_duration,
light_controller_isCTRGBLinked, light_controller_isCTRGBLinked,
light_subtype, light_subtype,
Settings->battery_level_percent==101?0:1, (Settings->battery_level_percent == 101) ? 0 : 1,
Settings->deepsleep==0?0:1 (Settings->deepsleep == 0) ? 0 : 1
); );
for (uint32_t i = 0; i < TasmotaGlobal.shutters_present; i++) { for (uint32_t i = 0; i < TasmotaGlobal.shutters_present; i++) {