Compare commits

...

8 Commits

Author SHA1 Message Date
Eric Bodden
0863071ff5
Merge cae49e9260 into 4e88f48a71 2025-01-09 13:45:24 +01:00
Eric Bodden
cae49e9260
Minor fix
Signed-off-by: Eric Bodden <eric.bodden@upb.de>
2025-01-08 17:38:25 +01:00
Eric Bodden
e4992701cf
Implemented suggestions
Signed-off-by: Eric Bodden <eric.bodden@upb.de>
2025-01-08 17:36:24 +01:00
Eric Bodden
228f6fa916
Merge branch 'openhab:main' into patch-1 2025-01-08 17:29:55 +01:00
Eric Bodden
19f0867c84
Update bundles/org.openhab.automation.jsscripting/README.md
Co-authored-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Eric Bodden <eric.bodden@upb.de>
2025-01-08 08:13:01 +01:00
Eric Bodden
4b97657e99
Update bundles/org.openhab.automation.jsscripting/README.md
Co-authored-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Eric Bodden <eric.bodden@upb.de>
2025-01-08 08:12:46 +01:00
Eric Bodden
f9f5b6af2d
Update bundles/org.openhab.automation.jsscripting/README.md
Co-authored-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Eric Bodden <eric.bodden@upb.de>
2025-01-08 08:10:28 +01:00
Eric Bodden
730d32c3c9
Added example now to hide notifications again
Signed-off-by: Eric Bodden <eric.bodden@upb.de>
2024-12-25 10:19:57 +01:00

View File

@ -800,6 +800,13 @@ actions.notificationBuilder('Hello World!').logOnly().send();
// Sends a simple log notification with icon and tag
actions.notificationBuilder('Hello World!').logOnly()
.withIcon('f7:bell_fill').withTag('important').send();
// Sends a notification about a temperature change ...
actions.notificationBuilder('new temperature: xyz').withIcon('oh:temperature').withTag('Temperature change').withReferenceId('livingRoom').send();
// ... and hides it again after 10 minutes
setTimeout(() => {
actions.notificationBuilder().hide().withReferenceId('livingRoom').send();
}, 10 * 60 * 1000);
```
See [openhab-js : actions.NotificationBuilder](https://openhab.github.io/openhab-js/actions.html#.notificationBuilder) for complete documentation.