Help finding the right syntax to change sensor state

I have made a small Node-Red flow that I want to use to lock/unlock my SurePet Cat flap door.
I have created at input boolean in Home Assistant (input_boolean.katteluke) that I use as trigger.
The flow looks like this:

[{"id":"7d2ef6e0.398ee8","type":"api-call-service","z":"1eaa63dd.c44b4c","name":"Lock","server":"c20c4f32.3a7de","version":1,"debugenabled":true,"service_domain":"input_text","service":"set_value","entityId":"sensor.pet_flap_katteluke_inngangsdor","data":"state: Locked_in","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":380,"wires":[[]]},{"id":"c20c4f32.3a7de","type":"server","name":"Home Assistant - Min","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

What I need help with is how to format the syntax in the call service node… Or if I even should use call service at all?

This is from one of the call service nodes:


In Home Assistant -> Developer tools -> States, this is how the entity look like:


Any help is appreciated.

In the data field fill in the axact payload value, thus not with state in front of it. Try with or without like "Locked_in" or Locked_in.

Thanks for replying.
Unfortunately, it didn’t work.

{"state": "Unlocked"}

and your entity id should be an input_text not a sensor

Thank you for your answer.
It didn’t work, though.
It gives the error: Call-service API error. Error Message: extra keys not allowed @ data[‘state’]

I don’t understand. The entity I want to change the state for is a sensor. How can that be changed?
This is how it looks now:


Maybe it’s wrong to use a call-service node?


{"value": "Unlocked"}

and in your screenshot, the entity id is still has a domain of sensor it should be an input_text

Thank you.
It does not give me any errors now.
But I still don’t understand you last part there.
Anyway; it gives no errors, but it doesn’t do anything either.
But I’m not sure it is possible to manipulate that particular device / entity through HA at all.

Thank you