Sebastian Muszynski
4 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
0 deletions
-
src/publisher/pubMqtt.h
|
@ -238,6 +238,10 @@ class PubMqtt { |
|
|
if(!mCfgMqtt->enableRetain) |
|
|
if(!mCfgMqtt->enableRetain) |
|
|
retained = false; |
|
|
retained = false; |
|
|
|
|
|
|
|
|
|
|
|
// Home Assistant requires retained discovery messages
|
|
|
|
|
|
if(strncmp(subTopic, MQTT_DISCOVERY_PREFIX, strlen(MQTT_DISCOVERY_PREFIX)) == 0) |
|
|
|
|
|
retained = true; |
|
|
|
|
|
|
|
|
mClient.publish(mTopic.data(), qos, retained, payload); |
|
|
mClient.publish(mTopic.data(), qos, retained, payload); |
|
|
yield(); |
|
|
yield(); |
|
|
mTxCnt++; |
|
|
mTxCnt++; |
|
|