node-red-contrib-home-assistant-websocket
node-red-contrib-home-assistant-websocket copied to clipboard
Reseting wait-until node requires entity_id
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
When wait-until node is configured to get entity_id from incoming message (Entity ID field is empty), it fails when receiving message in order to reset node state. If message with "reset" property contain no entity id, the node throws error.
It would make sense in case the node evaluates conditions for each entity id interdependently. But AFAIK it doesn't. So, sending reset without entity_id is functional hence shouldn't throw error.
To Reproduce
Run example below
Expected behavior
Sending message with reset attribute should no require entity_id in the message, thus should not raise error.
Screenshots

Watch out renamed HA server configured in the node. Configure to your one.
Example Flow
[{"id":"d271a1ed.bf6d08","type":"ha-wait-until","z":"d36bc71f.81d9c8","name":"Wait for Ext Temp","server":"6cdd0bc8.b8e434","outputs":1,"entityId":"","entityIdFilterType":"exact","property":"state","comparator":"lte","value":"$env('temp_threshold')","valueType":"jsonata","timeout":"0","timeoutType":"num","timeoutUnits":"hours","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":630,"y":550,"wires":[[]]},{"id":"bca36a2b.88a568","type":"change","z":"d36bc71f.81d9c8","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":550,"wires":[["d271a1ed.bf6d08"]]},{"id":"83617659.de4e98","type":"inject","z":"d36bc71f.81d9c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":550,"wires":[["bca36a2b.88a568"]]},{"id":"6cdd0bc8.b8e434","type":"server","name":"HA MaXyM","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
### This package's version
0.33.1
### Is Node-RED running in Docker?
Home Assistant add-on
### Node-RED version
1.3.3
### Node.js version
0.0.0
### Additional context
Don't know how to check node.js version.