Requesting another user's autorization for an action?

Hi. I have a weird requirement and I am wondering if (and how) it could be achieved.

Suppose a user wants to open a special door, but is not always allowed.

  1. He would tap some button to ask for permission
  2. and that would send a request to another user (let’s call him the “boss”)
  3. The boss could reply (yes or no),
  4. The event would happen (door opens) if the answer is “yes”.
  5. Or the original requester would be notified of a “no” answer.

As an improvement (nice to have, but not entirely necessary), I would even prefer that instead of opening the door immediately, it would just create a time interval where the original requester could tap a button and the door would open. Something like: “ok, in the next 5 minutes you are authorized to use the button to open the door”, with a notification sent to the requester saying so. This would mitigate the danger of situations where the boss takes some time to answer, and the requester has already walked away from the door when it opens.

Is it possible? Thanks in advance for any ideas.

Have a look here…
Actionable Notifications | Home Assistant Companion Docs (home-assistant.io)

Thanks! That looks nice. I think I have all I need there.

A couple of questions if you don’t mind …

  1. I am not seeing exactly how the notifications match users, meaning, where can I state which user I want to send it to?

  2. How would you advise the other version I suggest in my post at the end? Making it slightly more asynchronous.

First of all and to be totally honest I did not read all details, just wanted to give a pointer based on request/reply> action

Good question and indicating that I am not all knowing, you could relate this to the automation/event but this could become hard-coding (which I personally dislike). A long time ago I tried to identify who actioned but could not get to this detail…which does not mean it does not exist today. You possibly could send it to a predefined group which consists of people who can approve and meaning that you do not need to check who approves

Honestly, all (!) is possible in IT and python capabilities are vast … but the scripting may become overly complex to manage meaning that creation is one thing, updating another. What you seem to want is a workflow alike solution and for that I would refer to Nodered, it will add complexity / etc. and I am questioning if HA is the solution you want.
I for sure do not want to downgrade HA as it is really (no jokes !) great but one also has to review if this is in line with a professional/regulatory solution that you seem to seek.

EDIT: in my work I am daily trying to not go into solution-mode but question the request and make requestsers aware…hence not presenting solutions and more ‘ideas’

1 Like