Help needed on creating a notification message with date and time.
What is need is:
Rule:
triggers:
-
id: “1”
configuration:
thingUID: mqtt:topic:174b0f34af
previousStatus: ONLINE
status: OFFLINE
type: core.ThingStatusChangeTrigger
conditions: []
actions: -
inputs: {}
id: “2”
configuration:
type: application/vnd.openhab.dsl.rule
script: |-2
var message = “ESP32 not online”
(var or val ?) var when = Date? + Time ?
var icon = “temperature”
var severity = HIGH"sendNotification("someone@yahoo.com", message + **when** ) sendBroadcastNotification(message) sendLogNotification(message) sendNotification("someone@yahoo.com", message, icon, severity) sendBroadcastNotification(message, icon, severity) sendLogNotification(message, icon, severity)
type: script.ScriptAction