Merge pull request #9937 from s-hadinger/zigbee_eeprom_valid_time

Zigbee save data to EEPROM only if time is valid
This commit is contained in:
s-hadinger 2020-11-21 18:07:59 +01:00 committed by GitHub
commit 83ed3a526d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -206,6 +206,7 @@ class SBuffer hibernateDeviceData(const struct Z_Device & device, bool mqtt = fa
\*********************************************************************************************/
void hibernateAllData(void) {
#ifdef USE_ZIGBEE_EZSP
if (Rtc.utc_time < START_VALID_TIME) { return; }
if (!zigbee.eeprom_ready) { return; }
ZFS_Write_File write_data(ZIGB_DATA2);