this works but with flaws.. the goal is to set countdowntimer and have a resetbutton combined with the force button. (while forcing is set, timer will be set to reset) However, in this i tried but here isnt any way to stop the timer or set a new value to 0 to force timer to end.
How should you have done? build a function?
Summary
[
{
"id": "36b3d6632c413afb",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "3ded2428931db138",
"type": "Tasmota Switch",
"z": "36b3d6632c413afb",
"broker": "e2ab6a5a844ef0f2",
"device": "TAS_motorv",
"name": "Heater",
"outputs": 1,
"uidisabler": false,
"fullTopic": "",
"cmndPrefix": "",
"statPrefix": "",
"telePrefix": "",
"qos": 1,
"retain": false,
"x": 370,
"y": 240,
"wires": [
[
"af619c4cc5014b86"
]
]
},
{
"id": "7d01ede34d141d6c",
"type": "ui_button",
"z": "36b3d6632c413afb",
"name": "",
"group": "c24e4a9c.e31a68",
"order": 0,
"width": 0,
"height": 0,
"passthru": false,
"label": "pushbutton, start heater 30min",
"tooltip": "obs",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 170,
"y": 120,
"wires": [
[
"f32dc433fd419a39"
]
]
},
{
"id": "b59d7a4040054842",
"type": "debug",
"z": "36b3d6632c413afb",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 650,
"y": 80,
"wires": []
},
{
"id": "4a445d20cccddd8f",
"type": "ui_text",
"z": "36b3d6632c413afb",
"group": "c24e4a9c.e31a68",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Minutes left:",
"format": "{{msg.payload}}",
"layout": "col-center",
"className": "",
"x": 650,
"y": 120,
"wires": []
},
{
"id": "f32dc433fd419a39",
"type": "countdown",
"z": "36b3d6632c413afb",
"name": "",
"topic": "",
"payloadTimerStart": "true",
"payloadTimerStartType": "bool",
"payloadTimerStop": "false",
"payloadTimerStopType": "bool",
"timer": "30",
"resetWhileRunning": false,
"setTimeToNewWhileRunning": true,
"startCountdownOnControlMessage": false,
"minuteCounter": true,
"x": 390,
"y": 120,
"wires": [
[
"3ded2428931db138"
],
[
"b59d7a4040054842",
"4a445d20cccddd8f"
]
]
},
{
"id": "686f35754394e116",
"type": "ui_switch",
"z": "36b3d6632c413afb",
"name": "",
"label": "Force start/ stopp",
"tooltip": "ICE - just dont..",
"group": "c24e4a9c.e31a68",
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"decouple": "false",
"topic": "topic",
"topicType": "msg",
"style": "",
"onvalue": "true",
"onvalueType": "bool",
"onicon": "",
"oncolor": "",
"offvalue": "false",
"offvalueType": "bool",
"officon": "",
"offcolor": "",
"animate": false,
"className": "",
"x": 150,
"y": 240,
"wires": [
[
"3ded2428931db138"
]
]
},
{
"id": "af619c4cc5014b86",
"type": "ui_text",
"z": "36b3d6632c413afb",
"group": "c24e4a9c.e31a68",
"order": 3,
"width": 0,
"height": 0,
"name": "",
"label": "True: running, False: not running",
"format": "{{msg.payload}}",
"layout": "col-center",
"className": "",
"x": 660,
"y": 240,
"wires": []
},
{
"id": "e2ab6a5a844ef0f2",
"type": "tasmota-mqtt-broker",
"name": "",
"broker": "192.168.1.211",
"port": "1883",
"clientid": "",
"usetls": false,
"keepalive": "60",
"cleansession": true
},
{
"id": "c24e4a9c.e31a68",
"type": "ui_group",
"name": "heater",
"tab": "6310834e.f9ff6c",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "6310834e.f9ff6c",
"type": "ui_tab",
"name": "IOT - heater",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]