Simulated Bulb: Sending an "ON" command when already "ON"

I was wondering if someone could help me; I am using simulated bulb to control a lighting fixture. This fixture turns “on” automatically when the power switch is turned on, but this can not be transmitted to ST.
If the simulated bulb is off, but the fixture is on, telling ST (via Voice Assistant) to turn off the light, no command is sent as it is already off.
Is there a way to force the command to be resent despite being off/on so that it can be seen in SharpTools?
Any assistance you can offer is greatly appreciated.
Sincere regards,
Ryan Carmichael

Is the fixture controlled by another smart device, like a wall switch? Is that the power switch you’re referencing? If so, you should be able to use the Smart Lighting app to “mirror behavior” the bulb and power switch when the app asks “what do you want to do?”.

This is the part that’s throwing me off a bit. Why can’t this be sent to ST?

Thank you for your reply.
The device is a Mi-Light bulb triggered through Tasker on an Android tablet; switch commands are sent to tasker through SharpTools.
The device does not send a command back to tasker for me to let ST know the state of the bulb.
Hopefully that clears up what I’m trying to do, let me know if not.
Sincere regards,
Ryan Carmichael

Ah, ok got it now. Thanks for that clarification. Is there a SharpTools topic or Community? Tagging @joshua_lyon

It depends on the device handler that’s being used and how you are issuing the on/off command. The normal ‘Virtual Switch’ device type handler in the IDE does allow sending multiple events of the same state.

For example, I setup a dashboard in that allows me to control the virtual switch and setup a simple rule that issues the off() command when the rule is manually run. Then in Tasker I setup a Profile that flashes the device status anytime the switch state changes.

As you can see, I’m able to issue the off() command multiple times in a row and the device still reports the off events so they get pushed down to the SharpTools Tasker Plugins.


The SharpTools community is available at:

And I’m still active on the SmartThings community too! If a post includes “SharpTools” somewhere in the body, I’ll usually get notified of it. Though @JDRoberts usually tends to be faster than the computers at tagging me. :stuck_out_tongue:


Thank you both for your replies,
I do apologize if I put this topic in the wrong group; I didn’t think this was a SharpTools query.

Triggering directly from the SharpTools Rule Engine I do get a trigger in ST. However when asking Google Home to do it no event is triggered, so I presume it is the Google Assistant notat fault.
Do you know of any work-around? So far I’m thinking of using a virtual switch as a “Three-Way” switch; I’ll let you know if I manage to get it working…
Sincere regards,
Ryan Carmichael

I have created a Virtual Dimmer Switch, and using SharpTools Rules if over 51 turns on the Virtual Bulb, and under 49 turns it off (before returning to 50).
I then use a Google Assistant Routine to control the dimmer value if I ask to turn the bulb on or off.
Strangely, the SharpTools Tasker Plugin does not see this change, despite being seen in ST (As an APP_COMMAND;could this be the issue?)
Any ideas as to why?
ATM I have set up a second profile in Tasker for the new dimmer switch…

I would need to see what you have setup on the Tasker side. The most common issues are not subscribing to the attribute of the new device in the main SharpTools for Android app… or Tasker Profile Event filter configuration issues.

Unfortunately I changed the DHT I was using before seeing your message, but I was subscribed to the “switch” attribute, and I used a “flash” task with no filters to check and still got nothing in Tasker.
It’s also worth mentioning that in the classic ST app you can press on or off (instead of just a toggle), but these did not register in the IDE.

I ended up switching the “Virtual Dimmer Switch” with the “Simulated Device Preferences” DHT which does allow the on and off commands to be sent multiple times.

The only thing that would make this solution better is if I could modify the DHT
to also be able to resend the on/off command; if this is possible, are you able to help me with the coding for this?

The SmartThings documentation on device handlers might be helpful to you. If you’re using the classic app, the second on tiles can help you add your own tiles to the device’s screen:

Thank you Joshua.