MQTT: Publish "stopped" to available topic on app stop (#22527)

* Publish "stopped" to available topic on app stop

* Add docs
This commit is contained in:
leccelecce
2026-03-19 14:46:37 -06:00
committed by GitHub
parent a9a2eecebb
commit c6991db432
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ These are the MQTT messages generated by Frigate. The default topic_prefix is `f
Designed to be used as an availability topic with Home Assistant. Possible message are:
"online": published when Frigate is running (on startup)
"offline": published after Frigate has stopped
"stopped": published when Frigate is stopped normally
"offline": published automatically by the MQTT broker if Frigate disconnects unexpectedly (via MQTT Will Message)
### `frigate/restart`
+1
View File
@@ -38,6 +38,7 @@ class MqttClient(Communicator):
)
def stop(self) -> None:
self.publish("available", "stopped", retain=True)
self.client.disconnect()
def _set_initial_topics(self) -> None: