Thanks!! do you know if there is something similar for cover entities such as garage door?
i guess still with the workarounds & the lovelace lock - there is value in having it built in globally and natively inside HA
I assume this wish is still pending.
In the meantime, I am using the entity button card, and its hold action.
Instead of a quick click, you need to click and hold for about 3 seconds, to trigger the action.
Just saw this. Fantastic idea.
I was using @faisalqureshiās solution, but then I found the lock feature natively supported by the button-entity custom cards. If you install this for lovelace, you can use the lock: true
functionality which is designed for this use case. I implemented this for my garage door (cover) entity and it works really well. You can even limit the āunlockā capability to only specific HA users!
screenshot:
custom card info:
My garage doorās lovelace entity config:
entity: cover.garage_door_opener
type: 'custom:button-card'
tap_action:
action: toggle
show_name: true
show_state: true
lock: true
state:
- value: closed
icon: 'mdi:garage'
styles:
state:
- font-size: 12px
- color: green
- value: open
icon: 'mdi:garage-open'
styles:
state:
- font-size: 12px
- color: red
Yes. I too discovered this custom card last week. It is amazing. Iām slowly changing all my cards to this. The level of customisation is fantastic.
Have you tried the āconfirmationā tag? It gives you a confirm prompt before triggering.
It also has tap_action, dbltao_action, and hold_action. Works very well for the situation in this thread.
Yep! I personally like the lock function, but that one also does the trick.
I still vote for this feature. I propose an update to persistent notifications component to also have ability to show lovelace dialogues.
For example you can specify if itās persistent notification or a lovelace popup with buttons that can trigger actions. That way anyone can use notifications for whatever they want. So if i want to display confirmation to turn off a light or disable home alarm arming i can do it. This seems like a vary basic functionality thatās missing.
- double_tap_action:
action: call-service
confirmation:
text: Are you sure you want to restart?
service: script.1585358453646
This is here as an fyi for anyone who comes through here later. This yaml is in my picture elements, and pops up a confirmation dialog for me.
- double_tap_action:
action: call-service
confirmation:
text: Are you sure you want to restart?
service: script.1585358453646
fyi this is a thing now
This is implemented in Lovelace now. Closing