lovelace-mushroom
lovelace-mushroom copied to clipboard
Add a confirmation to locks as a 2nd step
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.
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)?
I would apreciate this feature too. I've accidentally managed to open up by sunscreen very often. A confirmation step would fix this.
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.
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.
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.
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.
Is there a possibility of this feature being implemented soon? It's risky to have the door opening without any confirmation. Thanks
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
Use the confirmation option as described above
But the confirmation option is only for tapping on the card, not on the buttons
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.