Update entity state from a function?

I’ve been searching high and low for a way to update an entity from within a node red function. I have no problems getting variables, i.e.:

var currentACMode = global.get("homeassistant.homeassistant.states['input_select.temp_ac_mode_setting'].state")

But now that i’ve done my logic, i want to update some entities in HA and can’t seem to figure that out. is there a “call service” equivalent that i can use in a function?

No there is no such function.

welp, that stinks… thanks! i would have probably spent a couple more days searching. guess I’m going to have to replace the functions with some standard nodes.