Read the statement by Michael Teeuw here.
ALERT: setting the display time individually
-
If there’s a alert, I’d like to be able to tell how long the alert should stay. At present I understand this is a global variable in the config.js (
display_time). It would be nice, if this global variable could be overwritten, if I call the function.
I tried:
this.sendNotification("SHOW_ALERT", {type: "notification", display_time: "10000", title: "Title", message: "Message"});But still, the global display_time was used. Did I miss something?
-
@binderth a notification display time cannot be set in a notification itself, it’s up to the user to define the notification time for the alert module.
{ module: 'alert', config: { display_time: 10000 } }if you want to set the duration you have to use an alert instead of notification:
this.sendNotification("SHOW_ALERT", {timer: 10000, title: "Title", message: "Message"}); -
@strawberry-3.141 said in ALERT: setting the display time individually:
if you want to set the duration you have to use an alert instead of notification:
this.sendNotification(“SHOW_ALERT”, {timer: 10000, title: “Title”, message: “Message”});ok, that did it. The Alerts are now shown as given in the “timer”-argument.
Nevertheless my usecase would be to have also multiple notifications staying on top like “washing machine ready” and “dryer ready” or something which needs some action done.So it would be nice to have either notification also displayed “on event” and not globally or to have notifications smoothed out, if the item action is done. As I can see, the alert-module doesn’t allow fading the notifications on a action?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login