Make switch only controllable by 1 user

I have a desktop PC. I don’t want kids accidentally turning off that power plug as it will lose all my work.
But I want to have it on my dashboard. Is there any way to do this? Maybe make it admin only?

Because I want to see it, and to use 1 dashboard not make an extra that is same in all other areas.

Try this…
iantrich/restriction-card: :lock: Apply restrictions to Lovelace cards (github.com)

1 Like

Yup, use the Restriction card, it works well. I have a couple of plugs used to hard shutdown a couple of systems when I absolutely have to. Because I didn’t want to accidentally trigger them, I put them behind a restriction card with a four-digit pin that needs to be entered first, then the switch becomes active for a brief time, and locks itself back up if it isn’t selected.

Jim

Thanks, that looks great, and seems I can even put conditions on.

Would I be able to put a confirm on only when the plug is drawing over 20w? If under then PC is already off, so no lock.

I’m not sure how to format it:

  - card:
      entity: switch.office_pc
    restrictions:
      confirm: true
        condition:
        entity: sensor.office_pc_power
        attribute: raw_state
        value: 20
        operator: <

Doesn’t seem to work

Lovelace Restriction Card - Client-side Security - Share your Projects! / Lovelace & Frontend - Home Assistant Community (home-assistant.io)