publish presence via mqtt
This commit is contained in:
11
Network.cpp
11
Network.cpp
@@ -148,6 +148,12 @@ void Network::update()
|
||||
}
|
||||
}
|
||||
|
||||
if(_presenceCsv != nullptr)
|
||||
{
|
||||
publishString(mqtt_topic_presence, _presenceCsv);
|
||||
_presenceCsv = nullptr;
|
||||
}
|
||||
|
||||
_mqttClient.loop();
|
||||
|
||||
vTaskDelay( 100 / portTICK_PERIOD_MS);
|
||||
@@ -240,6 +246,11 @@ void Network::publishBatteryReport(const Nuki::BatteryReport& batteryReport)
|
||||
publishInt(mqtt_topic_battery_lock_distance, batteryReport.lockDistance); // degrees
|
||||
}
|
||||
|
||||
void Network::publishPresenceDetection(char *csv)
|
||||
{
|
||||
_presenceCsv = csv;
|
||||
}
|
||||
|
||||
void Network::setLockActionReceived(void (*lockActionReceivedCallback)(const char *))
|
||||
{
|
||||
_lockActionReceivedCallback = lockActionReceivedCallback;
|
||||
|
||||
Reference in New Issue
Block a user