move publish presence detection to Network class

This commit is contained in:
technyon
2022-07-02 12:46:18 +02:00
parent beb87a959f
commit 4f442d7b1d
9 changed files with 35 additions and 43 deletions

View File

@@ -38,18 +38,6 @@ void NetworkOpener::initialize()
_network->registerMqttReceiver(this);
}
void NetworkOpener::update()
{
bool connected = _network->mqttClient()->connected();
if(!_isConnected && connected)
{
subscribe(mqtt_topic_lock_action);
}
_isConnected = connected;
}
void NetworkOpener::onMqttDataReceived(char *&topic, byte *&payload, unsigned int &length)
{
char value[50] = {0};