You could use the split output of the get-entities node to do multiple several service calls.
[{"id":"295c21dc.5cb70e","type":"inject","z":"ffbd7f06.4a014","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":332,"y":2368,"wires":[["25835b72.64f7a4"]]},{"id":"25835b72.64f7a4","type":"ha-get-entities","z":"ffbd7f06.4a014","name":"","rules":[{"property":"entity_id","logic":"starts_with","value":"light.","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":486,"y":2368,"wires":[["487c9089.ff5bf"]]},{"id":"487c9089.ff5bf","type":"api-call-service","z":"ffbd7f06.4a014","name":"Turn off Light","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"{{payload.entity_id}}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":662,"y":2368,"wires":[[]]}]
or use a JSONata expression with a single service call
[{"id":"295c21dc.5cb70e","type":"inject","z":"ffbd7f06.4a014","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":340,"y":2358,"wires":[["25835b72.64f7a4"]]},{"id":"25835b72.64f7a4","type":"ha-get-entities","z":"ffbd7f06.4a014","name":"","rules":[{"property":"entity_id","logic":"starts_with","value":"light.","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":494,"y":2358,"wires":[["487c9089.ff5bf"]]},{"id":"487c9089.ff5bf","type":"api-call-service","z":"ffbd7f06.4a014","name":"Turn off Light","version":1,"debugenabled":true,"service_domain":"light","service":"turn_off","entityId":"","data":"{\"entity_id\": $join(payload.entity_id, \",\")}","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":670,"y":2358,"wires":[[]]}]