fix bug in presence detection when last device is gone

This commit is contained in:
technyon
2022-05-28 10:07:58 +02:00
parent 939ee8b2e0
commit c3a4a0b3e8
3 changed files with 6 additions and 2 deletions

View File

@@ -40,7 +40,11 @@ void PresenceDetection::update()
vTaskDelay( 5000 / portTICK_PERIOD_MS);
if(_timeout < 0) return;
if(_devices.size() == 0) return;
if(_devices.size() == 0)
{
_network->publishPresenceDetection(";;");
return;
}
memset(_csv, 0, presence_detection_buffer_size);
_csvIndex = 0;

View File

@@ -1,3 +1,3 @@
#pragma once
#define nuki_hub_version "2.5"
#define nuki_hub_version "2.6"

Binary file not shown.