Password protected switch or/and view (tab). Child-lock

I don’t know if it possible but requiring a password/PIN before toggling some switches or opening a view (tab) would be a excellent feature.
Even an unsecured feature (like a child lock) to prevent the accidental toggle of a switch would be helpful.

Some examples:

  1. Preventing the accidental opening of the garage door.
  2. Preventing the accidental disconnection of a protected load.
  3. Locking the alarm system.
  4. Having an entire view password protected: climate control, set of switches, IP cameras etc.
  5. Having a password protected view in case there are multiple users.

Thanks.

7 Likes

Nice feature request!

That would be very useful. Especially for such switches like water, gas.

I need this very badly as I plan to mount an old smartphone at the door to arm and disarm my alarm scene. Any workarounds so far?

Or is it possible to get a view on just one specific group? I could set up the PIN for the phone itself and have it only show the alarm switch when unlocked. On the other devices, I would have to hide this group since I don’t want to have a PIN on my controlling devices… Would this be possible somehow?

EDIT: Happy New Year :slight_smile:

Hi,
That feature is a must I believe.

Even if the whole of home assistant is behind a password, I believe there are still some switches/scripts that need additional security and I would not want my housemates to activate those…

Is there no way to add a password to a switch at the moment?

Thanks

@andrey 's custom ui has Confirmable Controls: https://github.com/andrey-git/home-assistant-custom-ui#confirmable-controls

Doesn’t support pin, but may be a start.

1 Like

The only way (currently) that I can think to implement this is to have separate instances of Home Assistant. Anything you want “public” would go into a non-password or common-password (like a shared WPA-PSK arrangement) protected HA and made available to anyone. A 2nd instance could be embedded into the first instance (maybe with https://home-assistant.io/components/panel_iframe/ ), and have a non-available password.

Does that sound correct? I’m considering this implementation until a better setup becomes available, but if someone else has already ventured down this path and found it doesn’t work, that would be very helpful :slight_smile:

-Chad

Hi there.
It would be interesting to have something like this.
However, I think it should be only a component feature. You are proposing something a bit more complicated that will have a significant impact on the resources you have and it will be a bit difficult to implement by others.
Another limited option is to just use the input number component (or any other input component) + an automation to toggle a certain hidden switch once you input the right number.

Hi,

I have developed a custim-ui element that aims at doing that:
Hiding a group until a password has been entered on the input_text component.
And this is done on the client side, so only the client that entered the password see the group
I put the code and doc here :
Hide group with input_text

1 Like

Excellent. Thank you for your work.

+1 for this request :slight_smile:

+1 from me too. Would be nice to be able to share partial access to guests without opening a pandora’s box by allowing them to change sensitive/security settings
In addition to original requirement, if the protection could be programatically enabled/disabled with an optional expiry date, e.g allow access to view X until dd/mm/yyyy

Any progress or other solutions available to get this extra layer of security? would the new option to have multiple users solve this by creating a seperate user with special access?

This is a pretty old thread but I thought I’d chip in and suggest this would be a good feature to add. I have a siren switch that I’d like to have the open of either obtaining g confirmation before turning on or asking for a passcode (similar to the alarm keypad).

Would be amazing as I have a button for my PC to turn on and off but now someone can turn my PC off while im working :frowning:

+1 for this request

Hi, Your project is really interesting. Could you explain better how to put a code to a group of 4 buttons? I’m willing to pay your time. Thank you!

In Lovelace just use a conditional card:

conditions:
     - entity: <trigger entity>
       state: <trigger value>
card:
    entities:
        - <list all protected entities>
    type: entities
type: conditional

Trigger entity could be any entity, I use that with input-boolean for “advanced” tab and with input-text for “password protected” tab… But can be also used input-number or any other trigger, example: clima control showed only when device is on… Obviously that entity must be out of the triggered tab

@Fraschi any chance you’d be willing to post a fully functional example of a password protected card? I get the general idea, just not sure how to configure the trigger entity and value portion, being relatively new to Home Assistant’s configuration still.

I’ve just released a custom lovelace card that does this. - https://github.com/CyrisXD/love-lock-card