Not able to lock custom button card

Hi there,

I’m trying to the button for my curtains when the window is open. For now I’m using an input boolean, since I haven’t received the sensor yet. I can’t get it to function. It keeps giving me this error:

Configuration errors detected:
can not read a block mapping entry; a multiline key may not be an implicit key at line 6, column 11:
duration: 10
^

Code down below:

type: 'custom:button-card'
tap_action:
  action: toggle
lock:
  enabled: '[[[ return input_boolean.living_room_window === 'on'; ]]]'
  duration: 10
  unlock: hold
state:
  - value: open
    color: green
    icon: 'mdi:blinds-open'
  - value: closed
    color: red
    icon: 'mdi:blinds'
entity: cover.living_room_curtains

Think you need double quotes in the template. And not sure about the ;

And you need to acces the input_boolean via states so states.input_boolean.living_room_window.state

Have same problem, seems that template does not work, and when you find one that works you can’t get "enable: " statement working either.

This template works, but when putted into config does not.

enabled: '{{ 'true' if is_state('input_select.dayphase', 'Night') else 'false' }}'