mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-20 15:18:21 +03:00
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:
parent
a9a2eecebb
commit
c6991db432
@ -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`
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user