I have a lot of scenes.
Some are very long and include many conditions.
Many scenes are nested and trigger events in other scenes.
Sometimes Gladys does not behave as expected, which forces you to search for the error.
To do this, you can use the “Send a message via Telegram” function.
This function is handy, but when you have found and fixed your error, you must remove the “Send a message via Telegram” functions that you added to your scene, so as not to clutter your messaging.
I faced this problem: a scene triggering every 5 minutes and nested in 6 other scenes. It took me two days to set up the messages.
Every time Gladys sent a message, my phone rang — in short, it rang continuously. I had to find a workaround.
To do this, I created a new user that I named “Pause Debugging”.
Then, I added the “Send a message via Telegram” function in each of my scenes.
“Send a message via Telegram” to my account in order to receive the messages and be able to debug the scene.
The messages have the following structure:
(Scene: scene name) Allow identifying which scene sent the message.
Description of the actions performed by Gladys
I sent the value 1 to the thermostat to indicate the state of the virtual button “Forced stop”, then I retrieved the setpoint temperature value for the bathroom.
The last action of the scene will also have
END of (Scene: scene name)
Once your error(s) are corrected, simply change the recipient of the Telegram message to “Pause Debugging” so you no longer receive messages. It is then no longer necessary to delete them, because they will help better understand your scene when you consult it later, like annotations. In case of a problem, it will be enough to send the messages back to your account.
Below is an example of a message sent by the scenes.
NOTE: I had not yet integrated the name of the scene that triggers the message into each message.



