Always send mqtt message, but snapshot only if enabled & configured #639
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.
Previously if snapshot was enabled, mqtt_message was not sent to mqtt_topic.
Now, it always pubs to the mqtt_topic, but optionally and additionally pubs to the mqtt_snap_topic.
This change allows for monitoring subs that don't want snap, they can monitor the text-only pubs. For example, I log the motion triggers via text string, but don't need to get the snapshots for logging on all devices, they are already in frigate/NVR/etc. It generally makes automation triggers easier having the option of snaphot or message text available and then just subscribing to the appropriate topic
mqtt_message & mqtt_topic were already required parameters to the script so I wouldn't expect this to be a breaking change for anything. It shouldn't be much additional overhead, assuming mqtt_message configured is reasonable. Since they are already choosing to send a snapshot image, sending the message text as well should be negligible.