Help with automation night lights

Welcome.
Please read this, especially point 11