How to turn a smart bulb off after being switched on IF luminance is above value?


I have a ceiling fan with a smart bulb (sengled) that is controlled by a switch (both the fan and bulb). Sometimes I want to turn the fan on during the day but do not want the light to come on when it’s bright, yet need it to then come on when it’s dark.

I have tried several things I have tried doing this using a combination of the smart weather device in smartthings (to specify the luminance) and then an automation in smartthings. The automation stated if luminance is equal to or greater than 5000 lux then light off. This would not turn the light off even though the luminance is 10,000 lux currently.

I have tried doing something similar only changing the bulb to 1% brightness it would change it to the specified brightness but this was still too bright. I tried then using stringify to say if light = 1% brightness then off, this didn’t work well either from my experience stringify has been a little buggy.

Unfortunately smartthings doesn’t seem to simply allow me to just say if on and illuminance greater than 5000 then off (it prohibits if on and then off for the light). IFTTT seems to also prohibit this.

Any ideas? I’m not into writing code and programming I would like to (if possible use existing tools/apps IFTTT smartthings stringify or anything else that exists I am unaware of)

Thanks in advance.

Can you post a screenshot of the automation you are trying to use?

The weather capabilities used by smartthings changed recently because of changes to a third-party service, and it might be that that’s the only problem. They were supposed to have switched them over to a new service, but maybe they missed one reference.

Hey JD see attached.

OK, that’s the new app, and I don’t know that well as it is not VoiceOver compatible. So I’m not sure whether illuminance is working in that or not. You can try asking support since those are all official features, or maybe somebody else will come along in this thread and knows the answer. But I’m guessing it might have something to do with weather.


I think that it will work, but it will only be triggered when the illuminance value changes since it’s the only condition on the IF side. And unfortunately you can’t use the same device on both the IF and THEN. Do you have a motion detector or something else in that room you can use to add to the IF?

1 Like

I do not have a motion sensor and I’m not sure I would necessarily won’t it to be dependent on motion.

I am assuming the issue is because I need to say if luminance is greater than 5000 lux AND light on then turn light off but of course you can’t use the same device in both if and then in smartthings or IFTTT.

That’s why I tried using stringify in combination with smartthings like I described above but like I said it was unreliable. That’s why I Was hoping someone could think up a more reliable workaround that I am missing doesn’t require coding

Try setting it up with Smart Lights. It allows the same device for the trigger and action.

Upon initial inspection smart lights seemed really promising however it could not even pass the first basic test of just simply dimming the lights. I did proceed and also try saying if greater than a certain illuminance then turn off, which also did not work. Attached you can see I set illuminance far above what it would be yet it wouldn’t dim as I specified . I did also try a reasonable number which didn’t work either. Not sure if this is an issue with smart lights or smart weather.

This is probably too obvious, but have you verified from the device tile that the weather service you are using is in fact reporting illuminance throughout the day?

Yes this is a screenshot of the Info gathered by smart weather at this time. Im starting to think I may have to resort to using sunrise/sunset as an alternative. I feel like there has to be a way to do this though it really isn’t that complicated.

Your Smart Lights rule isn’t setup correctly. This is how you want it to turn off a switch if it’s bright outside:

1 Like

I just found an alternate way before I saw your post. The 1st issue at hand was that I couldn’t do this the easy way (regular smartthings automation) the reason why is because you can’t both check if a light is on and tell it to turn off in the same automation. So to make it so I CAN do that I created a virtual switch of my dining room light (where both on and off shut off the light) this way I can say “IF dining room light is on and illuminance is above X turn on Virtual Dining Room” it is also set to turn back to off after 10 seconds this way it can be controlled properly from a light switch .

I tested this a dozen times by setting the illuminance to only 1000 lux and it seemed to consistently work as I toggled the light switch.

1 Like