Using physical switch on a table lamp with a smart bulb?

Also, before we get too far away from the original question, I did just want to address the technical reasons why what you described doesn’t exist already.

there are two separate issues: event monitoring and time sequencing.

Event Monitoring

In order for smart app to know that the lamp has been turned off, One of two things has to happen. Either the lamp has to tell the hub that it is turning off, or the hub has to be checking the lamp every few seconds to see if it is on or off.

If you physically cut the power to the lamp with the lamp’s original switch, there’s no radio still turned on to tell the hub that it’s been turned off. So you can’t capture the event that way.

So the next question is why doesn’t the hub know that the device is now off power?

Most devices that work with SmartThings use either zigbee or Z wave. These are wireless “Mesh” protocols. They are intended for very low power devices that send very few messages and overcome the fact that they are very low power by passing a message around from one device to another until eventually it gets to the hub. This way each individual device doesn’t have to be very smart and doesn’t have to have long range. This keeps down the cost of the individual devices and greatly improves the efficiency of their power use.

Because of all this, it might be five minutes or even 15 minutes before the hub had any idea that the device was no longer online. In some cases it might not even know until the next time it tried to turn the device on. And if you substitute frequent polling, where the hub keeps asking the device if it’s turned on, you will tend to overwhelm the network so that the regular messages can no longer get through. Constant communication is just not what mesh is designed for.

Getting the timing right

Then there’s the timing issue which runs into the same kinds of stuff. Because messages can bounce around the network for a little while, you can’t guarantee the sequence in which they arrive or the precise timing. A message which takes five seconds to arrive one time might take seven seconds the next time, depending on how many bounces it takes.

For this reason, the official features will not let you schedule anything less than one minute apart. They just can’t guarantee that the timing can be that precise.

People do try to get around that with custom code, and in particular webcore will let you write a rule that is based on events being reported to the hub that are only a few seconds apart, but there’s just no guarantee that it will work reliably. It’s going to depend on how busy your network is with other things and just a certain amount of randomness in the mesh.

So trying to capture two events on the device that are five seconds or less apart from each other just isn’t really a good match to the SmartThings platform. And if you throw in the issue of actually physically cutting current to the device it’s even worse, because then you have to add polling from the hub side just to try to recognize that the power off event has taken place.

There are systems that do this, but they tend to be more expensive

There are some platforms that offer continuous communication, but they are typically based either on hardwire or on Wi-Fi. That makes sense for some applications, but adds cost and complexity that most people would not have in budget just for simple lighting systems.

So to go back to your original question, you probably could write a rule set in webcore that would continuously check the lamp all day long and try to recognize two off events that were less than five seconds apart, but you would run a very real danger of messing up the messages from your other devices Just because of all the extra traffic you put on the network, and you would also still run into the issue that mesh just doesn’t reliably report events that occur just a few seconds apart. And these are both problems that would get worse and worse the more devices you had on your network.

So I didn’t want you to think that we were ignoring that part of your question, and you could certainly try it if you wanted, I just don’t think the outcome is going to be satisfying.