Answer to a question I got about how to send a notification from an Edge App.
There are more information about this on the tech-pages here.
To send a notification you have to have the id of the notification output. The easiest way to get this is via the configuration interface, i.e. let the user create and choose the notification or notifications.
Example:
"notification_output": {
"name": "Select notification",
"description": "Select the notification output to send notifications with.",
"type": "single_notification_output_selector"
}
As an alternative to single_notification_output_selector can multi_notification_output_selector be used to get more than one notification outputs.
In this case to send a message you would use the following code:
lynx.notify(cfg.notification_output)
If you have a message that takes arguments you can add them by doing like:
local payloadData = {
value = value,
unit = unit
}
lynx.notify(cfg.notification_output, payloadData)
This message then makes sense:
"Hi, the value is now {{.payload.value}} {{.payload.unit}}.
If you have any other questions, please ask in this thread!