Switch to retained publication for MQTT target #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Propose changing the MQTT publication to retained by default, this makes it easier to see the last reading published from an Enviro sensor if the viewer / consumer / subscriber joins later. There is already a timestamp in the publication message so should be no risk of being confused at whether that reflects the current, or past, status of the Enviro. Added comments to indicate how to switch this back to False if preferred.
As an aside, I'm now comparing the format of these messages to those published by the MQTT sample shipped with the classic Enviro+ HAT, and will probably send a PR for the latter to get the data formats more aligned if possible.
Signed-off-by: Andy Piper andypiper@users.noreply.github.com