Not too sure what’s going on, but whenever a device event I subscribe to fires, it fires the event more than once. It’s not the code, I broke it down to just one line of code that subscribes and it still sends more than one event and unsubscribes on before it subscribes.
What I have noticed is this
- The first time I run the code, it works as expected and only sends one event
- If after I update my code, hit save then publish for me again, another event is sent. So now two events per subscription
This leads me to believe that unsubscribe is not working. Or When I update my smarttapp’s code, is there something I should do on my phone? I tried removing the smarttapp instead of updating it in the smartthings app. Has anyone else had this issue?
What’s your flow for creating, publishing, and updated a smarttapp’s code that will be published for me?