Led 30watt external light
You have three competing items here:
No Neutral (or at least, designed for &quot;no neutral&quot;)
Historically, there was no guarantee of neutral in a switchbox. So to make a &quot;universal&quot; switch (timer, dimmer, sensor) you designed it to not need a neutral. There are basically two ways to do that: leak through switched hot, leak to ground. Leak through switched hot used to be a great solution with incandescent bulbs. But not with LEDs.
Sensors Need Power
Many (though not all) switches with light sensors need to power to make them work properly. That means they need power all the time. So, as noted above, they will typically try to get that power using the same wire that is &quot;switched&quot; on/off. No problem with an ordinary switch as it doesn't need power to do anything except to power the light. But sensors, timers, smart switches, etc. need power to do things even when the light (or other switched load) is &quot;off&quot;.
LEDs Don't Need Much Power
This is the final piece of the puzzle. An incandescent bulb will happily let a little bit of current through with no visible effect. The current is going through the same filament that normally glows when &quot;on&quot;, but at a very low level of current there is no glow. It isn't &quot;dim glow&quot;, it is no light at all because the wire doesn't glow until it gets hot and it doesn't get hot unless it has a lot of current.
An LED bulb uses the current in an entirely different way. In a sense (not exactly), it grabs as much current as it needs, converts it from AC to DC and then uses the result to create light. As a result, it can produce a little bit of light with a little bit of current. Sometimes that translates into a dim light. Sometimes that translates into a flickering or flashing light. Sometimes it won't light up - but the sensor/timer/etc. won't work either. Sometimes it will work just fine (i.e., nothing visible but the sensor/timer/etc. works correctly). Which &quot;sometimes&quot; you get will depend on the particular type of light.
How to Fix
The NEC now requires neutrals in (or easily added via conduit) each switchbox. If you have an older house (like I do) then you have a few options:

Find the neutral and use a switch that works with a neutral. If you have a switch loop (power =&gt; light =&gt; switch) then this will probably not be so easy, but if you have a simple switch configuration (power =&gt; switch =&gt; light) then very often the neutral will be easily accessible - typically look for two or more white (and only white) wires wired together.
Add a neutral and use a switch that works with a neutral. If you have a switch loop or other wiring with no neutral accessible, add a neutral. If your wires are in conduit then it should be easy to add a neutral wire. But if not then you must replace the cable - you can't have cable-(black/white) and string a separate white wire next to it - you need to have /3 cable - black/red/white. (Doesn't have to be black/red but those are the usual colors in cables.)
Use a switch that doesn't need a neutral and doesn't use leakage current through the switched hot wire. It will be hard to something described exactly that way, so what you normally look for is a switch that (a) specifically lists &quot;LED compatible&quot;, (b) does NOT require a neutral wire and (c) requires a ground wire. All (or nearly all) switches will have a ground wire, but the key here is that the ground wire is actually functional and not merely for safety. Figuring this out may take a little digging.

For example (I haven't tried this one myself, but based on specs it should work), Lutron
Model # MS-O2S-2PK-WH Maestro Motion Sensor Switch:


&quot;works with any bulb type, including CFL and LED&quot;
&quot;no neutral required - ground wire required&quot;

If the ground was only for safety, then &quot;ground wire required&quot; would not be stated *and especially not right next to &quot;no neutral required&quot;.
In the instructions item 1 is &quot;Ground is required for product to function. If no ground wire is present, consult a licensed electrician.&quot;