Possible Bug: Tile indicating incorrect state

I have written a driver for Tasmota based Power Monitoring plugs. See here. https://github.com/GaryMilne/Tasmota-Plug-with-Power-Monitoring-for-SmartThings-Classic

When I turn them on via the dashboard they indicate they are on initially, but shortly after they indicate they are off and finally a few minutes later they indicate they are on. During this time I know the plugs are physically on and SmartThings also indicates they are on.

Not a big deal as I can see the wattage but thought I’d report it.

Reading through the linked Tasmota code, I noticed there’s a line in the parse() method that updates the switch attribute with the last command value (L848). Looking back at the on() command it looks like the last command value would have been On via callTasmota() - note the capitalization here! Then a few lines further down in the on() command it appears to use updatePowerState() which sends a proper on or off switch value.

Note that the Switch capability expects a lower case value of on or off. So the capitalized version of this from the callTasmota() / commandvalue could be causing the issue.

Out of curiosity, which tile layout are you using? eg. Switch Tile, Hero Attribute, etc.

1 Like

Sorry for the slow response. We left for Florida the day after I got your response. I understand what’s you are saying and I will take a look at it when I get back and have a real computer to work with. Unfortunately that will be another month yet.


1 Like