From 42d268c8691b5c72ee10ce145343fad395266486 Mon Sep 17 00:00:00 2001 From: ElMoribond Date: Sun, 20 Jun 2021 23:03:55 +0200 Subject: [PATCH] Add ability to restart --- web/src/api/mqtt.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/api/mqtt.jsx b/web/src/api/mqtt.jsx index 5ec59e7dc..e0413efdf 100644 --- a/web/src/api/mqtt.jsx +++ b/web/src/api/mqtt.jsx @@ -79,6 +79,7 @@ export function useMqtt(watchTopic, publishTopic, defaultValue = null) { const send = useCallback( (payload) => { + payload = payload || defaultValue; ws.send( JSON.stringify({ topic: publishTopic || watchTopic,