Add ability to restart

I restored the original line as it can be misleading.
This commit is contained in:
ElMoribond 2021-06-23 15:48:56 +02:00 committed by Blake Blackshear
parent e1b341788d
commit f9add57ed4

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: defaultValue };
const value = state[watchTopic] || { payload: null };
const send = useCallback(
(payload) => {