Lovelace Restriction Card - Client-side Security

Yea, basically this card is useless on a tablet in kiosk mode… at least it is for me…

Is it possible to unlock it using pin and it will directly to the site? This code gives me when i insert the pin code, it will unlocked but i need to tap it once again to open the path.

No. The unlock action is separate from whatever the available card actions are.

Hey, so i have a dropdown to seleft in between normal and guest mode, how will i do it so when it’s in normal it will be the normal dashboard but when it’s set to guest mode, the dashboard will hide some things and show others for a user called “tablet”.
Is that posible?, if so how will it be done?

@tom_l @iantrich Being able to limit the input type would be greatly helpful! I looked at the code to try and figure out how to do it but couldn’t figure it out. Any chance this feature can be implemented in future releases? Or some guidance on what changes to make locally to limit the input keyboard to only show digits instead of full keyboard (like phone number input)

Please read this. Especially as I have nothing to do with the development of this frontend resource.

Hi there,
First thanks for this feature, i use it to confirm my gate oppening, i dont want to open the main gate by missclick, this feature saves my smart house big time.
I need little help though, can i change the after confirmation time to interact with some entity?

Now after i press the confirmation dialog i have 3seconds time to interact even though i have not clicked the switch, i want to be able to interact with the switch at least 1min, because i use the same switch to open/stop/close the main gate.


If you just want to prevent miss-clicks you can use the core tap action confirmation.

Screenshot 2023-03-17 at 09-06-59 Actions

My sincere apologies for tagging you! This was literally my first post ever in HA forums and thank you for setting me straight! :slight_smile:

Hi there, thanks for the amazing card.
I read the thread but honestly couldn’t make this work with only those information

Is it possible to have the lock icon on the right side of the card? I would like it in the empty space left by the title

type: custom:restriction-card
duration: 10
action: hold
  square: false
  columns: 1
  type: grid
    - type: custom:mushroom-title-card
      title: Chiavi

Any help is appreciated, thank you!

It’s a global setting in your theme. restriction-lock-margin-left

Thank you, I never used themes so I had to read something in the documentation, but your post pointed me in the right direction.

For anyone trying to achieve this whth no experience with themes, you have to put this string in your config.yaml file:

      restriction-lock-margin-left: 95%

And you need to select the new created theme “Lock” on each dashboard that needs to have the lock on the right side

has anyone found an alternative to this card? since 2023.5 it has some display issues: locks shown past dashboard limits when scrolling, multiple locks displayed over the “more info” pop-up. an issue was open on github about the upgrade following polymer deprecation, but the project looks more or less abandoned.

on the Lock, depending on your card, you need to set the z-index.
eg, using custom:button-card, you can do:

      - color: red
      - icon: mdi:lock-alert
      - z-index: 1

this has been the case for some time, and has become even more of a requirement with latest HA Frontend, where I believe a setting below or beyond 7 is necessary.

restriction card requires a mod-card (because it has no ha-card element):

  type: custom:mod-card
    style: |
      ha-card {
        z-index: 1;
    type: custom:restriction-card
1 Like

I have this configuration of the Restriction Card which is working great by the way, but there are a few issues with it, visually speaking. I have a dashboard view with a single alarm panel card, set to Panel view. Once I added it to the Restriction Card its height got smaller, it didn’t fit the dashboard view anymore. Any suggestions? Also the text to show when locked option doesn’t show up when locked.

type: custom:restriction-card
  block: true
  text: xxxxxxxxxxx
  entity: input_boolean.alarm_helper_switch
  value: 'on'
  type: alarm-panel
    - arm_home
    - arm_away
    - arm_night
  entity: alarm_control_panel.gc131_alarm

Anyone willing to help with this issue? Theme showing lock icon under pop-up window · Issue #86 · iantrich/restriction-card · GitHub
It seems that @iantrich is not available anymore.

This options should be implemented into HA natively…

It would be nice, but there isn’t anything similar there AFAIK…

I do not recommend updating to 1.2.8.
(unless you use the card with “row: true”)

1 Like

Same, it stopped working on my card after the update. I think I’ll downgrade, the pop-up problem didn’t bother me so much because I only have one lock in the dashboard and I reduced its size