Restriction Card - PIN Code lock

I am new here and HA is even new to me, so maybe someone can help quickly. I was setting up a button to turn on and off a Shelly Socket. But I want this switch beeing protected by a PIN Code. Downloaded Restriction Card in HACS, but have no idea where to input the YAML code. See what I have here:

type: custom:restriction-card
restrictions:
pin:
code: 1234
text: Enter PIN
card:
type: entity
entity: switch.nn

Who can help me ?

As you showed, it’s correct. Check if you have the card installed, try restarting, and this would be the code:

yaml

type: custom:restriction-card
restrictions:
  pin:
    code: 1234
    text: Enter PIN
card:
  type: entity
  entity: switch.nn

Make sure it’s properly structured.

  1. Please always post a code properly formatted - otherwise it cannot be analysed; place a code into triple “`” backticks.
  2. This is a better place to ask questions.