Current State Node doesn´t see Entity ID since last Node-Red update

Hi

I´m having a problem with this Flow. It was working well in Home Assistant before the last update of node-red. Now it isn´t working properly.

This is my flow:

And this is how should work:

  • With a single click of Aqara switch the Bedroom Table toggle. This work ok
  • With a double click of Aqara Switch the flow should switch ON the bedroom and Sinfonier lights if Sinfonier light is ON, or switch OFF the bedroom and Sinfonier lights if Sinfonier light is OFF. This is not working

The problem that I see is that I´m not able to see the state of Sinfonier Light with the node “Current State”, that node only see the state of Aqara Switch, Why?, it was working before.

This is the node Sinfonier state:
image

Best regards

[{"id":"2b7d9160.2d81fe","type":"server-events","z":"d783c4b2.959d28","name":"Click Aqara","server":"6355ba6b.3c7634","event_type":"xiaomi_aqara.click","x":410,"y":820,"wires":[["7db78dee.ba5054"]]},{"id":"7db78dee.ba5054","type":"switch","z":"d783c4b2.959d28","name":"Which Switch?","property":"payload.entity_id","propertyType":"msg","rules":[{"t":"eq","v":"binary_sensor.switch_158d00016be082","vt":"str"},{"t":"eq","v":"binary_sensor.switch_158d00018b4e17","vt":"str"},{"t":"eq","v":"binary_sensor.switch_158d0001b19ae3","vt":"str"},{"t":"eq","v":"binary_sensor.switch_158d0001e18e62","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":620,"y":820,"wires":[[],["c901028e.38308"],[],[]]},{"id":"c901028e.38308","type":"switch","z":"d783c4b2.959d28","name":"Type of Click?","property":"payload.event.click_type","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"long_click_press","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":900,"y":820,"wires":[["4085882f.83e378"],["8cc79ad0.448d58"],[]],"inputLabels":["Sinfonier"],"outputLabels":["Single","Double","Long"]},{"id":"4085882f.83e378","type":"api-call-service","z":"d783c4b2.959d28","name":"Toggle Bedroom Table","server":"6355ba6b.3c7634","service_domain":"light","service":"toggle","data":"{\"entity_id\":\"light.yeelight_color1_34ce00824cdf\",\"transition\":\"1\"}","mergecontext":"","output_location":"","output_location_type":"none","x":1240,"y":700,"wires":[[]]},{"id":"40734f94.ae907","type":"api-call-service","z":"d783c4b2.959d28","name":"Switch On Bedroom Table","server":"6355ba6b.3c7634","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.yeelight_color1_34ce00824cdf\",\"transition\":\"1\"}","mergecontext":"","output_location":"","output_location_type":"none","x":1760,"y":800,"wires":[["742188bf.bad6e8"]]},{"id":"6bc5aed6.fb0c5","type":"api-call-service","z":"d783c4b2.959d28","name":"Switch Off Bedroom Table","server":"6355ba6b.3c7634","service_domain":"light","service":"turn_off","data":"{\"entity_id\":\"light.yeelight_color1_34ce00824cdf\",\"transition\":\"1\"}","mergecontext":"","output_location":"","output_location_type":"none","x":1770,"y":1020,"wires":[["22ac40.8ce8c3c"]]},{"id":"742188bf.bad6e8","type":"api-call-service","z":"d783c4b2.959d28","name":"Switch On Sinfonier Table","server":"6355ba6b.3c7634","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.yeelight_color1_34ce0084675c\"}","mergecontext":"","output_location":"","output_location_type":"none","x":2010,"y":800,"wires":[[]]},{"id":"22ac40.8ce8c3c","type":"api-call-service","z":"d783c4b2.959d28","name":"Switch Off Sinfonier Table","server":"6355ba6b.3c7634","service_domain":"light","service":"turn_off","data":"{\"entity_id\":\"light.yeelight_color1_34ce0084675c\",\"transition\":\"1\"}","mergecontext":"","output_location":"","output_location_type":"none","x":2030,"y":1020,"wires":[[]]},{"id":"f9bf57d6.220198","type":"switch","z":"d783c4b2.959d28","name":"Change Bedroom and Sinfonier Table","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1430,"y":940,"wires":[["40734f94.ae907"],["6bc5aed6.fb0c5"]]},{"id":"8cc79ad0.448d58","type":"api-current-state","z":"d783c4b2.959d28","name":"Sinfonier State?","server":"6355ba6b.3c7634","outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"light.yeelight_color1_34ce0084675c","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1160,"y":940,"wires":[["f9bf57d6.220198"]]},{"id":"409c0659.911918","type":"comment","z":"d783c4b2.959d28","name":"Single Click","info":"","x":1110,"y":800,"wires":[]},{"id":"49a5e86b.3b1268","type":"comment","z":"d783c4b2.959d28","name":"Double Click","info":"","x":1110,"y":880,"wires":[]},{"id":"6355ba6b.3c7634","type":"server","z":"","name":"Home Assistant"}]

Hi,

Any luck finding a solution to this issue?

I am facing the same problem, destroying quite a few of my flows. It seems that after the update, the current state node is no longer passing data for the entity asked, but is instead just passing the original message. I have a feeling that this is actually due to an enhancement to this specific node, but I just can’t get my head around it.

Yes, I found a solution, deleting the msg.payload before the Current State Node

It´s working for me

3 Likes

Nice one, thanks for sharing! :slight_smile:

you are welcome

THANK YOU!
I was stuck on this for ages until I found this!

As of version 0.12.0, you can you use Block Input Overrides to accomplish the same thing.

1 Like

for me the problem was solved adding an small delay before the current state node to give home assistant some time to update it