restriction-card icon indicating copy to clipboard operation
restriction-card copied to clipboard

Duration parameter without effect

Open iridium2001 opened this issue 2 years ago • 2 comments

Checklist:

  • [ x] I updated to the latest version available
  • [ x] I cleared the cache of my browser

Release with the issue: 1.2.7

Last working release (if known):

Browser and Operating System: Edge, Version 110.0.1587.50 (64-Bit) Home Assistant Core 2023.2.5

Description of problem:

Duration parameter does not have any effect. Does not cause an error, but seems to be always 5 seconds. Irrespective if set to e.g. 1 or 10 seconds.

type: custom:restriction-card card: show_name: true show_icon: true type: button tap_action: action: toggle entity: light.licht_eg restrictions: pin: code: 1234 duration: 2

Javascript errors shown in the web inspector (if applicable):


Additional information:

iridium2001 avatar Feb 26 '23 13:02 iridium2001

I just tried it, and it seems to work fine.

Fusseldieb avatar Nov 08 '23 14:11 Fusseldieb

@iridium2001 The code you posted is not properly formatted. Always place a code inside triple "`". Otherwise it is impossible to analyse (we can only guess where indents were placed). You should have checked YOURSELF after posting how the post is displayed.

Regarding the issue. Please test this code:

type: custom:restriction-card
action: hold
duration: 10
card:
  type: entities
  entities:
    - entity: input_boolean.test_boolean

It works as intended with a 10 seconds delay.

Or this example (close to yours) which also works OK:

type: custom:restriction-card
action: hold
duration: 2
card:
  show_name: true
  show_icon: true
  type: button
  tap_action:
    action: toggle
  entity: input_boolean.test_boolean
restrictions:
  pin:
    code: 1234

Please confirm if you still observe the bug, otherwise the issue will be closed.

ildar170975 avatar Nov 24 '23 02:11 ildar170975

No feedback from OP for more than 2 months. Closing.

ildar170975 avatar Feb 10 '24 15:02 ildar170975