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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) => {