Unfortunately this doesn’t work for me. I think the problem is inside the wait until node.
Is there a way to debug this jsonata code with HA specific details ? I mean in the way like I could test the (jinja2) templates in the developer section of HA ?
My complete flow is like this:
[{"id":"919d2e2e.224808","type":"tab","label":"Humidity","disabled":false,"info":""},{"id":"3f68a6b9.d101ba","type":"server-state-changed","z":"919d2e2e.224808","name":"Humidity rising","server":"8cc86afe.93d7a8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.badkamer_hum_rising","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":40,"wires":[["4b90f4a7.9b5d84"],[]]},{"id":"68b68b1e.081cb4","type":"server-state-changed","z":"919d2e2e.224808","name":"Humidity too high","server":"8cc86afe.93d7a8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.badkamer_humidity","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"80","halt_if_type":"num","halt_if_compare":"gt","outputs":2,"output_only_on_state_change":true,"x":120,"y":100,"wires":[["4b90f4a7.9b5d84"],[]]},{"id":"85ae639f.660b6","type":"server-state-changed","z":"919d2e2e.224808","name":"button preshed","server":"8cc86afe.93d7a8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.badkamer_afzuiging","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":160,"wires":[["4b90f4a7.9b5d84"],["57818783.041df8"]]},{"id":"bb0c82ed.f05da8","type":"api-call-service","z":"919d2e2e.224808","name":"set target hum","server":"8cc86afe.93d7a8","version":1,"debugenabled":true,"service_domain":"input_number","service":"set_value","entityId":"input_number.target_badkamer_hum","data":"{ \"entity_id\": \"input_number.target_badkamer_hum\", \"value\": {{payload}}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":120,"y":460,"wires":[["7a35731.fa7df0c"]]},{"id":"4b90f4a7.9b5d84","type":"api-current-state","z":"919d2e2e.224808","name":"get minhum1h","server":"8cc86afe.93d7a8","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.minhum1h","state_type":"num","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":140,"y":300,"wires":[["114cb031.6ac6b8"]]},{"id":"7a35731.fa7df0c","type":"api-call-service","z":"919d2e2e.224808","name":"fan on","server":"8cc86afe.93d7a8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.afzuiging_low, switch.afzuiging_high","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":130,"y":560,"wires":[["fd575590.5ab05"]]},{"id":"fd575590.5ab05","type":"ha-wait-until","z":"919d2e2e.224808","name":"wait for target hum","server":"8cc86afe.93d7a8","outputs":2,"entityId":"sensor.badkamer_humidity","entityIdFilterType":"exact","property":"state","comparator":"lt","value":"$entities(\"input_number.target_humidity\").state","valueType":"jsonata","timeout":"1","timeoutType":"num","timeoutUnits":"hours","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":470,"y":560,"wires":[["57818783.041df8"],["57818783.041df8"]]},{"id":"57818783.041df8","type":"api-call-service","z":"919d2e2e.224808","name":"fan off","server":"8cc86afe.93d7a8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.afzuiging_low, switch.afzuiging_high","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":560,"wires":[["a7b7c0bb.3a1a08"]]},{"id":"a7b7c0bb.3a1a08","type":"api-call-service","z":"919d2e2e.224808","name":"reset target hum","server":"8cc86afe.93d7a8","version":1,"debugenabled":true,"service_domain":"input_number","service":"set_value","entityId":"input_number.target_badkamer_hum","data":"{\"entity_id\":\"input_number.target_badkamer_hum\",\"value\":0}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1110,"y":560,"wires":[[]]},{"id":"114cb031.6ac6b8","type":"change","z":"919d2e2e.224808","name":"add 10 to target hum","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload + 10","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":140,"y":380,"wires":[["bb0c82ed.f05da8"]]},{"id":"4388d9e6.653108","type":"inject","z":"919d2e2e.224808","name":"virtual button off","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":400,"y":120,"wires":[["57818783.041df8"]]},{"id":"57de8c8a.bc100c","type":"inject","z":"919d2e2e.224808","name":"virtual button on","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":400,"y":180,"wires":[["4b90f4a7.9b5d84"]]},{"id":"8cc86afe.93d7a8","type":"server","z":"","name":"Home Assistant","addon":true}]