I don't see where webCoRE is sending the command twice ("toggle" is not a real command but a "virtual" command, and "off" is the one it actually executed according to your logs--there is one entry for each from what I can see).
If the same thing is happening with Basic Rule, that further suggest something with the device and not an app.
Have you verified that there isn't some problem with the device? Try running the "On" and "Off" commands there yourself, from the device detail page, to see if anything odd happens. Make sure that the device state also updates as expected under "Current States," otherwise a toggle isn't going to work as expected since it relies on the current state to know which command to send.
It may also be good to know what button device and light this is (manufacturer, model, and driver). For example, this odd behavior could be caused if you're using a "scene dimmer/switch," one that sends button events to the hub, and you have it both as the button device in this rule and as the actual light/switch you are controlling.
The device turns on/off correctly on the device page.
When I first got the button device and wrote the basic rule it was working fine.
Sometime later it stopped working for all my devices using toggle.
I have 6 zigbee plugs that I use in this manner and they all do the same.
To rule out something with webCoRE, which seems unlikely but is a very complicated app for a simple automation, I'd suggest re-creating the Basic Rule and enabling all logging. Then, if the problem is still there, see what "Logs" (filtered to just this Basic Rule) show. If nothing suspicious, enabling all logging for the button device and outlet and adding those to the list of filtered apps/devices for the logs may show additional clues.
Re-creating the piston could also help if you think it's only something there.
It's not only WebCore, as I explained, I have a basic rule in use now for my other five plug devices and they do the same thing.
I've even tried the button controller app and it does the same, on/off.
Or if it's on, the same occurs, it turns them off and back on.
I would start by addressing the questions I posed above. I can't say anything more without more information since nothing looks odd from the webCoRE logs above alone.
This is also good information. Here's my guess: your button device occasionally sends duplicate events, then the app triggers twice in a row, therefore toggles the device twice in a row, and the result is the behavior you describe.
If it were the app, it seems more likely that this problem would happen all the time. You can further rule out the app versus the device by using a virtual button device and seeing if you can replicate the behavior that way.
However, this is not possible to conclude without log entries from the failure. (Although in this particular case, the "Events" history from the device may also help, accessible from the device detail page.)
I just had a thought.
I bought all these plugs at the same time.
It may be the plugs. What was bothering me about blaming the plugs was that some worked most of the time, then occasionally they all failed at the same time, which led me to believe it was a problem inside the hub.
I've just ordered new plugs to prove it one way or the other.
Thanks for your attention, I will report on the outcome Monday when they arrive.
Well, that's one thing you can try. But it may not be your problem, and it's an unnecessary expense if it's not.
I'd suggest, again, looking at the specific logs, event history, and other ideas I described above to see if you can figure out what the root cause of the problem is.
Click the "info" box in that Logs screenshot above to go to the device detail page for Living Room Light (or just go there yourself from Devices on the left). Then, click "Events" at the top.
In this table, look for entries named "command-off" and "command-on" around 15:30:10. In the "Produced by" column, what apps are listed for all such commands? (You may see multiple entries around this time; look at them all--but again, you are only interested in commands, not events--names that start with "command-" and have "command" in the "Type" column.)
Looks like you have an automation in Apple Home that is turning this device on. That is probably interfering with your desired outcome from Hubitat.
Check your "Automations" tab in the Home app, or temporarily disable the HomeKit integration, among other possible ways to eliminate this concern, to see if that helps.