Shutter close sensor control

Hello and welcome to the forum. Please edit your post and format your pasted code as per point 11 here.

It appears you have attempted this but are using three single quotes ‘’’ instead of three backticks ```.