With sendBroadcastNotification
, I can send a notification to my mobile.
Is it somehow possible, to remove such a message again?
The task I would like to solve: When the garage door is still open late at night, I want to be reminded on the mobile to close it. Now after I (or anyone else) closed the door, the message is not relevant anymore, and should disappear automatically on all devices.
According to the docs, there exist some Hide Notification Actions, but I couldn’t get my head around the explanation, and also did not find any sample code.
This is what I tried for testing, but hideBroadcastNotificationByTag
is not a valid command.
rule "NotificationTest"
when
Item testMessageItem received command
then
if (receivedCommand == "ON")
{
sendBroadcastNotification("TestMessage", "garage", "garage_tag")
}
else
{
hideBroadcastNotificationByTag("garage_tag");
}
end