I wonder if someone can help me here - I have a temperature value which for some reason, is a string. In some nodes I can force it to act as a number (and I have done so in the flow below to be able to add 2 to it)
Essentially I want my towel rail to go off when the temperature is increased by two
The problem seems to be that the wait node never triggers, presumably because my now number is not equal to the string it's being compared to.
I'm not clear on how I can either revert the stored flow variable to be a string, or use the string as a number in the wait node... can anyone advise?
Maybe there is a better way to do this than the wait node that I'm missing!?
Any help appreciated
[{"id":"795593744ea3239b","type":"trigger-state","z":"9dddcfaf9cc3bc8a","g":"cfcae76508526628","name":"Bathroom Towel Rail Turns On","server":"3aa13fed.bf745","version":5,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["switch.shelly1_f4cfa276b8a6"],"substring":[],"regex":[]},"debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"x":1040,"y":660,"wires":[["d40a4d86259c5273"],["b648b7279de430d9"]]},{"id":"d40a4d86259c5273","type":"api-current-state","z":"9dddcfaf9cc3bc8a","g":"cfcae76508526628","name":"UFH Thermostat Temp","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.ufh_true_temperature","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1320,"y":640,"wires":[["543c5e039b066342"]]},{"id":"543c5e039b066342","type":"change","z":"9dddcfaf9cc3bc8a","g":"cfcae76508526628","name":"flow.thermostat-temp","rules":[{"t":"set","p":"themostat-temp","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"target-thermostat","pt":"flow","to":"$sum([msg.payload,2])","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1560,"y":640,"wires":[["9c694a0dc0f7605f","9f4faefa777dafc5"]]},{"id":"b648b7279de430d9","type":"change","z":"9dddcfaf9cc3bc8a","g":"cfcae76508526628","name":"reset","rules":[{"t":"set","p":"payload","pt":"msg","to":"reset","tot":"str"},{"t":"set","p":"reset","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":720,"wires":[["9f4faefa777dafc5"]]},{"id":"9f4faefa777dafc5","type":"ha-wait-until","z":"9dddcfaf9cc3bc8a","g":"cfcae76508526628","name":"UFH Thermo hits 2deg more","server":"3aa13fed.bf745","version":3,"outputs":1,"entities":{"entity":["sensor.ufh_true_temperature"],"substring":[],"regex":[]},"property":"state","comparator":"is","value":"target-thermostat","valueType":"flow","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","checkCurrentState":true,"blockInputOverrides":true,"outputProperties":[],"x":1520,"y":700,"wires":[["836ce44f4b9584f2"]]},{"id":"836ce44f4b9584f2","type":"api-call-service","z":"9dddcfaf9cc3bc8a","g":"cfcae76508526628","name":"Turn off Bathroom Towel Rail","server":"3aa13fed.bf745","version":7,"debugenabled":false,"action":"switch.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["switch.shelly1_f4cfa276b8a6"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"switch","service":"turn_off","x":1800,"y":700,"wires":[[]]},{"id":"9c694a0dc0f7605f","type":"change","z":"9dddcfaf9cc3bc8a","name":"Target","rules":[{"t":"set","p":"payload","pt":"msg","to":"target-thermostat","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1690,"y":580,"wires":[["b531620e410bb22c"]]},{"id":"b531620e410bb22c","type":"debug","z":"9dddcfaf9cc3bc8a","name":"debug 105","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1830,"y":580,"wires":[]},{"id":"d5fd4a8b5c9dfe6f","type":"inject","z":"9dddcfaf9cc3bc8a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1320,"y":500,"wires":[["1418a9f00a77793e"]]},{"id":"1418a9f00a77793e","type":"api-current-state","z":"9dddcfaf9cc3bc8a","name":"","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.ufh_true_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1590,"y":500,"wires":[[]]},{"id":"3aa13fed.bf745","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]