Add check for valid time

This commit is contained in:
Theo Arends 2020-07-16 17:28:47 +02:00
parent 344c091f83
commit 031b04fb53
1 changed files with 6 additions and 5 deletions

View File

@ -802,8 +802,9 @@ void TuyaSetWifiLed(void)
}
#ifdef USE_TUYA_TIME
void TuyaSetTime(void)
{
void TuyaSetTime(void) {
if (!RtcTime.valid) { return; }
uint16_t payload_len = 8;
uint8_t payload_buffer[8];
payload_buffer[0] = 0x01;