Here's my flow:
[
{
"id": "8ea50271.939ae",
"type": "delay",
"z": "a84d5beb.895958",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 440,
"y": 1600,
"wires": [
[
"5032178a.d3b698"
]
]
},
{
"id": "5032178a.d3b698",
"type": "function",
"z": "a84d5beb.895958",
"name": "reset_topic",
"func": "msg.payload = 0;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 620,
"y": 1600,
"wires": [
[
"e5de41ff.8975c"
]
]
},
{
"id": "e5de41ff.8975c",
"type": "mqtt out",
"z": "a84d5beb.895958",
"name": "",
"topic": "sensors/rtl_433/Smoke-GS558/unit",
"qos": "",
"retain": "true",
"broker": "c10f09f0.421e98",
"x": 890,
"y": 1600,
"wires": []
},
{
"id": "8e8d66ea.b85608",
"type": "mqtt in",
"z": "a84d5beb.895958",
"name": "",
"topic": "sensors/rtl_433/Smoke-GS558/unit",
"qos": "2",
"datatype": "auto",
"broker": "c10f09f0.421e98",
"x": 200,
"y": 1600,
"wires": [
[
"8ea50271.939ae"
]
]
},
{
"id": "c10f09f0.421e98",
"type": "mqtt-broker",
"z": "",
"name": "dietpi",
"broker": "localhost",
"port": "1883",
"clientid": "node-red",
"usetls": false,
"compatmode": false,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]