Maybe using a function block will help you
[{"id":"10d237f5abaeef12","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"21","payloadType":"num","x":1074,"y":486,"wires":[["e086b16f5f5b1e3d"]]},{"id":"b36a7b4a0c534feb","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"22","payloadType":"num","x":1076,"y":522,"wires":[["e086b16f5f5b1e3d"]]},{"id":"ed5785eff42dfac5","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"23","payloadType":"num","x":1076,"y":558,"wires":[["e086b16f5f5b1e3d"]]},{"id":"bc69c06df7e46843","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"24","payloadType":"num","x":1076,"y":594,"wires":[["e086b16f5f5b1e3d"]]},{"id":"da0e065ba252cac4","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"25","payloadType":"num","x":1076,"y":666,"wires":[["e086b16f5f5b1e3d"]]},{"id":"eafc1f7be0fe2ba2","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"26","payloadType":"num","x":1076,"y":702,"wires":[["e086b16f5f5b1e3d"]]},{"id":"7052d3e1ded26a82","type":"inject","z":"c991dbcde03824f2","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"27","payloadType":"num","x":1076,"y":738,"wires":[["e086b16f5f5b1e3d"]]},{"id":"e086b16f5f5b1e3d","type":"function","z":"c991dbcde03824f2","name":"","func":"const t = flow.get('temperature') ?? {\n 'alarm': 25, //set temperature alarm here\n 'sms': false\n}\n\nlet alarm = {}\n\nif (msg.payload >= t.alarm && !t.sms){\n alarm.payload = `send sms alarm ${msg.payload}`\n t.sms = true\n flow.set('temperature', t)\n return [ msg, alarm ]\n}\n\nif (msg.payload < t.alarm && t.sms){\n alarm.payload = `send sms no alarm, t stable ${msg.payload}`\n t.sms = false\n flow.set('temperature', t)\n return [ msg, alarm ]\n}\n\nreturn [ msg, null]","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":594,"wires":[["1ac7d78807bcc019"],["3686b9dbf1eff01b"]]},{"id":"1ac7d78807bcc019","type":"debug","z":"c991dbcde03824f2","name":"t","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1412,"y":576,"wires":[]},{"id":"3686b9dbf1eff01b","type":"debug","z":"c991dbcde03824f2","name":"alarm","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1412,"y":612,"wires":[]}]
to remove the set value