Send message to current user from script

I try to do the following:
I built a script to shutdown my NAS. Users are using Android App or PC with Chrome Browser and starts the script from the dashboard. In some cases I want to avoid the shutdown of the NAS.
Is it possible to send a notification to the user who trys to start the script? I’m already using notifications for Android app users but how to notify if its an Chrome Browser user?

Confirmation?

Thanks for your answer. This could be a workaround, seems it’s not possible in a better way…
For the future I would like:

  • beeing able to send a confirmation from a script to user who started the script (even if it was started from a browser)
  • use the “confirmation” inside of actions with the possibility of using parameter “exemptions” with an entity_id instead of user (for example: just showing the confirmation if a binary_sensor is true)

But why do you want it as a notification?
It’s possible, but it’s hard to know who was at the computer

Sorry for my bad explanation…
I’m using a script to shutdown my NAS. The script could be triggered from the dashboard. Dependent on a entity state there should raise a confirmation if somebody hit the button on the dashboard:

  • state of entity is true: raise the message and let the user confirm the shutdown or abort
  • state of entity is false: no message necessary, perform shutdown

The confirmation in tap_action is a really nice hint, but it’s not possible to send the confirmation in dependency of a entity state. That’s why i thought about checking the entity state in script and generating a message for the user - but I haven’t found a possibility to raise a message/confirmation from script (except messages to android app, but in this case this is not very useful… usage is mostly via Chrome Browser).

Make 2 cards. One card that executes the script, another card that requires conformation. In the visibility section of the card, show the confirm button when the sensor active, the other when it’s not.

1 Like

Yes, that’s exactly what I did this morning as a workaround.