Add ability to restart

This commit is contained in:
ElMoribond
2021-06-20 22:31:27 +02:00
committed by GitHub
parent d076e76d39
commit 36d6a5a51b
+1 -1
View File
@@ -75,7 +75,7 @@ export function MqttProvider({
export function useMqtt(watchTopic, publishTopic, defaultValue = null) {
const { state, ws } = useContext(Mqtt);
const value = state[watchTopic] || { payload: null };
const value = state[watchTopic] || { payload: defaultValue };
const send = useCallback(
(payload) => {