Anyway to search node red for specific entity within a call service node?

Some flow is turning off my kitchen overhead lights, but I cant find which one. As I know the entity name is light.kitche_overhead_lights , why am I unable to search node red using that value? If I happened to call a node, kitchen light, then it will find it. But I am guessing I mislabeled a node something else, but the entity is actually the kitchen light.

Or I am open to other ways of figuring this out. Is there anyway for node red to show me a list of the last 20 flows that ran, or something like that?

I was under the impression that the Node-RED ‘search flows’ option looks inside everything, hence searching for ‘rts’ finds my entity ‘light.lighting_receiver_rts’ within a call service node. Hence ‘_lights’ should find anything containing that string in the name.

That said, call service nodes can be called with the entityId in payload.data, and it may be a constructed name, or you may have used an area or a device.

Other ways:
I have been meaning to do something with JSONata on the JSON flow file for some time, so this was excuse to experiment.
The following flow will read in the flows.json file, cycle through the tabs, and nodes on each tab, pick out api-call-service nodes, then list them. From this it extracts the nodes with entities, and then back-lists each entity showing the corresponding tab, node, and service call.

This is quite a long ask for JSONata, especially with large flow files, so don’t run this when your HA is trying to do too much as it will lock up Node-RED for a few seconds. I have tested it on my 1.2 Mb flow file, but it may fail to read very large files fully.

[{"id":"608156bd5856b255","type":"file in","z":"6b44f4865618efa0","name":"flows.json","filename":"/config/flows.json","filenameType":"str","format":"utf8","encoding":"none","allProps":false,"x":340,"y":380,"wires":[["378352870dd13a88"]]},{"id":"5ff443fa1b32dfeb","type":"inject","z":"6b44f4865618efa0","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":380,"wires":[["608156bd5856b255"]]},{"id":"42f5727c97ca9bda","type":"debug","z":"6b44f4865618efa0","name":"debug 313","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":830,"y":380,"wires":[]},{"id":"378352870dd13a88","type":"change","z":"6b44f4865618efa0","name":"Find service call entities in all flows","rules":[{"t":"set","p":"payload","pt":"msg","to":"$eval(payload)","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"(\t    $tabs:=payload[type=\"tab\"].{\"tabname\": label, \"id\": id };\t    $tabs.(\t        $tab:=$;\t        $nodes:=$$.payload[z=$tab.id];\t        $ncs:=$nodes[type=\"api-call-service\"];\t        $result:=$ncs.{\t            \"tab\": $tab.tabname,\t            \"node\": name,\t            \"service\": domain & \":\" & service,\t            \"areas\": areaId!=[] ? areaId,\t            \"devices\": deviceId!=[] ? deviceId,\t            \"entities\": entityId\t            };\t        $result!={} ? {$tab.tabname: $result};\t    )\t)","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"(\t    payload.*[entities].(    \t        $a:=$;\t        $a.entities.(\t            {\"entity\": $,\t            \"tab\": $a.tab,\t            \"node\": $a.node,\t            \"service\": $a.service}\t        )\t    )\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":380,"wires":[["42f5727c97ca9bda"]]}]

You should be able to look through the result array to find the entity you want, and if it is there it will give you the tab and node it is referenced within.