I used the daylight sensor as light switch. It works very well at night and day.
When it is day and there is rain or thunder, the sensor gets still a light signal. Normally the sensor shouldn't get a signal because of the darkness. Monsters can also spawn when it rains, because it's so dark. But i want to avoid that monsters are spawning.