How can I pass a payload message from node red to an MQTT action?
I'm trying to launch a Burnt Toast Notification with a text message from Node Red via msg.payload. https://github.com/Windos/BurntToast
Now as a powershell command in hass agent i linked to a ps1 file: powershell -ExecutionPolicy Bypass -File "C:_automationScripts\mqtt-toast-notification.ps1" "{payload}"
and via node red I send an mqtt out to the command with my custom payload. The notification pops up, but the message is still "{payload}"
ps1 contents below:
param (
[string]$Message = "Default Notification"
)
If no parameter was passed, use the first argument
if ($args.Count -gt 0) {
$Message = $args[0]
}
New-BurntToastNotification -Text "Home Assistant", $Message
GitHub
GitHub - Windos/BurntToast: Module for creating and displaying Toas...
Module for creating and displaying Toast Notifications on Microsoft Windows 10. - Windos/BurntToast
3 Replies
Help us Help Others!
To help others find answers, you can mark your question as solved via
Right click solution message -> Apps -> ✅ Mark Solution

Help us Help You!
Please don't delete messages or posts because it makes it impossible to understand what happened. If you don't want your messages to be seen then don't post here.
We will help as soon as possible.
While you're waiting you can try the following:
- Checkout the documentation. - Search here in discord for previously solved similar issues.
@DrR0x