sidddy / flora

ESP32 BLE client for Xiaomi Mi Plant sensors
MIT License
190 stars 71 forks source link

Sensor have no value in HA after restart (no retain) #27

Open gericho opened 5 years ago

gericho commented 5 years ago

Thank you very much for this piece of software, this is awesome! Just to understand, if it is possible to send the MQTT with the retian flag so after a Home Assistant restart, it'll show the last value instead of waiting half an hour in order to retrieve the new one. Is that possible?

Thank you

XMaarten commented 4 years ago

You can solve this by adding true to the client.publish, like this: client.publish((baseTopic + "temperature").c_str(), buffer, true);