Add ability to restart

This commit is contained in:
ElMoribond 2021-06-20 23:03:55 +02:00 committed by GitHub
parent 36d6a5a51b
commit 42d268c869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,7 @@ export function useMqtt(watchTopic, publishTopic, defaultValue = null) {
const send = useCallback( const send = useCallback(
(payload) => { (payload) => {
payload = payload || defaultValue;
ws.send( ws.send(
JSON.stringify({ JSON.stringify({
topic: publishTopic || watchTopic, topic: publishTopic || watchTopic,