i used a change node to put the status of the swotch in a global var, that can be used by the function node, too.
so now i have If it is dark (depends on my position) and if switch is "off" it will let the PIR trigger... if on of this is not set. It will do nothing.
great job
thanks for your input und to the other thretads that help me out: