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

I am unable to use custom Lovelace card. please look at my configuration
What i did
1 copy - love-lock-card.js to config/www/custom_ui and config/www
2. edit Lovelace card with different paths like below.

resources:
  - url: /local/love-lock-card.js
    type: js
resources:
  - url: /local/www/love-lock-card.js
    type: js
resources:
  - url: /local/www/custom_ui/love-lock-card.js
    type: js
resources:
  - url: /config/www/custom_ui/love-lock-card.js
    type: js

Have you tried restarting your Home Assistant instance? It looks like it can’t find the JS file.

Yes, I restarted Home Assistant after configuration editing.

You may be able to do this with the Manual Alarm Control Panel with MQTT Support:

Hi Smile,

I think the path to the JS file must be in dashboard. Not a your card.

Hello CyrisXD,

I liked your card!! But how can i use it with a switch? I want to open the front door with it. But when i change the “type” from light to switch it won’t work. :frowning:

What im doing wrong ?

Hi @Thetmar, my card is based on the vertical stack card, if you can get it working with that it should be fine with my card. But it looks like you’re having trouble with “toggle-lock-entity-row” instead of my love-lock-card. Try changing the second type to :

type: entities

Thanks :slightly_smiling_face: you are right .js file path was wrong.

I really like the idea of this password setup! is it still valid?

I have added the js in the www folder and added the path in the raw config editor:

And the code for the “Manuel card”

What am I missing, sorry my first attempt using custom js files

Thanks
Casperse

Hello,

Very difficult for me to understand what I need to fix, but finally I did it :slight_smile:
here it is my code:

type: 'custom:love-lock-card'
title: PM
popup: confirm
cards:
  - type: entities
    entities:
      - entity: switch.shelly_shem_b9edc3_1
        name: PM2
  - type: entities
    entities:
      - entity: switch.tv_wifi_subwoofer_google
        name: sw

Soooo…I don’t want my 3D printer accidentally being turned on. It’s 2020 now. What’s the status @ha???

4 Likes

Sadly this is not truly secure and also not officially on Home Assistant, thought with it being a 3 year old request, I would think it would be.

It’s certainly secure enough to prevent you accidentally turning on your 3D printer.

If only I were the one I wanted to stop from turning it on. Haha

but you can assign a pin number to be required to unlock, just keep the pin a secret :slight_smile:

Add this damn thing !!! otherwise users wont pay for this … and switch to something secure solution, at least i wont pay for it thats for sure

??? This doesn’t cost anything… and the feature is available, as I linked. Plus now with the ability to create multiple dashboards you can just create a ‘kids’ dashboard which doesn’t include whatever switches you don’t want them to access.

no need multiple dashboard, just a few switches should have PIN. Also HA is not free, if you want to use google assistant you need to pay monthly fee as i know.

Well I did originally post about putting a pin on the switches… So I still don’t understand your complaint.
And no, you don’t HAVE to pay to use Google assistant. There is a way to use it without Nabu Casa. Plenty of people (including myself previously) do this