Pyscipt using service.call

Hello HOAS community,

I am trying to call a service with pyscript to set an input boolean from on to off once the dishwasher produces a “Run” state. I am attempting to do this via Service.Call and calling the input_boolean.turn_off but can’t get it to work. I keep getting a keyerror: input_boolean.turn_off.

Can anyone see where i am going wrong?

In case anyone is wondering i figured it out anyhow. This is how it should be written.