File tree 1 file changed +7
-0
lines changed
bundles/org.openhab.automation.jsscripting
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -800,6 +800,13 @@ actions.notificationBuilder('Hello World!').logOnly().send();
800
800
// Sends a simple log notification with icon and tag
801
801
actions .notificationBuilder (' Hello World!' ).logOnly ()
802
802
.withIcon (' f7:bell_fill' ).withTag (' important' ).send ();
803
+
804
+ // Sends a notification about a temperature change ...
805
+ actions .notificationBuilder (' new temperature: xyz' ).withIcon (' oh:temperature' ).withTag (' Temperature change' ).withReferenceId (' livingRoom' ).send ();
806
+ // ... and hides it again after 10 minutes
807
+ setTimeout (() => {
808
+ actions .notificationBuilder ().hide ().withReferenceId (' livingRoom' ).send ();
809
+ }, 10 * 60 * 1000 );
803
810
` ` `
804
811
805
812
See [openhab-js : actions.NotificationBuilder](https://openhab.github.io/openhab-js/actions.html#.notificationBuilder) for complete documentation.
You can’t perform that action at this time.
0 commit comments