IOT relay control problem

got it working.
Stupid programming mistake.
:man_facepalming: