lovelace-mushroom icon indicating copy to clipboard operation
lovelace-mushroom copied to clipboard

Add a confirmation to locks as a 2nd step

Open steffenrapp opened this issue 2 years ago • 6 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like It can happen that you accidentally tap on unlock or open at a lock. To prevent this it would be great to have an optional confirmation step after tapping on unlock or open at a lock.

steffenrapp avatar Apr 18 '22 11:04 steffenrapp

I don't have a lock so not sure if it works the same, but Home Assistant offers this built in. This is how I did it on my template card:

type: custom:mushroom-template-card
primary: Garage door
secondary: >-
  {% if is_state('binary_sensor.door_entrance_1_contact', 'off') %}Closed{% else
  %}Open{% endif %}
icon: mdi:garage
entity: binary_sensor.door_garage_1_contact
tap_action:
  action: call-service
  service: switch.turn_on
  service_data: {}
  target:
    entity_id: switch.garage_door
  confirmation:
    text: Are you sure?

Have you tried adding those last two lines onto your card's code (within the tap_action section)?

lukyjay avatar Apr 19 '22 02:04 lukyjay

I would apreciate this feature too. I've accidentally managed to open up by sunscreen very often. A confirmation step would fix this.

basroovers avatar Apr 19 '22 09:04 basroovers

I don't have a lock so not sure if it works the same, but Home Assistant offers this built in. This is how I did it on my template card:

type: custom:mushroom-template-card
primary: Garage door
secondary: >-
  {% if is_state('binary_sensor.door_entrance_1_contact', 'off') %}Closed{% else
  %}Open{% endif %}
icon: mdi:garage
entity: binary_sensor.door_garage_1_contact
tap_action:
  action: call-service
  service: switch.turn_on
  service_data: {}
  target:
    entity_id: switch.garage_door
  confirmation:
    text: Are you sure?

Have you tried adding those last two lines onto your card's code (within the tap_action section)?

Thank you, this is a great feature for the template card and the functionality is exactly what I meant! Unfortunately it seems that this doesn't work with the specific lock card as you don't tap the card itself but the separate buttons on it. So you won't use tap_action here ... In this case this feature needs to be integrated into the lock card for an easy setup and use.

steffenrapp avatar Apr 20 '22 16:04 steffenrapp

Would be great for sliders for lights also for example, so that you don't accidentally slide them when scrolling. I am using this with my existing button cards: https://github.com/custom-cards/button-card#lock-object Something like that would be awesome.

isabellaalstrom avatar May 03 '22 09:05 isabellaalstrom

I would apreciate this feature too. I've accidentally managed to open up by sunscreen very often. A confirmation step would fix this.

I have my cards setup so the single click action does nothing and double click does unlock.

davidcoulson avatar May 03 '22 11:05 davidcoulson

This would be a good addition to the cover card as well. I don't want to accidentally open or close my garage door if I tap on the arrow button.

bpottle1 avatar Aug 02 '22 18:08 bpottle1

Is there a possibility of this feature being implemented soon? It's risky to have the door opening without any confirmation. Thanks

mmbarki avatar Mar 09 '23 15:03 mmbarki

Is there a possibility of this feature being implemented soon? It's risky to have the door opening without any confirmation. Thanks

Use the confirmation option as described above

lukyjay avatar Mar 10 '23 00:03 lukyjay

Use the confirmation option as described above

But the confirmation option is only for tapping on the card, not on the buttons

thor9898 avatar Mar 11 '23 14:03 thor9898

I'm closing this issue because I think it's better to just not use unlock/open actions from a card. As there is a new more info dialog for locks which allows to open a lock (has not been supported before) this might be a better way and opening the dialog itself is also some kind of confirmation.

steffenrapp avatar Aug 18 '23 22:08 steffenrapp