I added a garage door opener to my setup but last day I pressed the open arrow on the widget by mistake on my phone; stubby fingers!
That made me realize that I should have a meachnism that has the control of the garage door opener disabled by default in the UI (but doesn’t interfere with Voice Assistant). Something to make changing the garage door state a 2-step process.
I was thinking of a toggle switch inside the same Garage door cover widget that enables/disables the actual control of the garage door. Toggle switch returns to disable after a couple of seconds/minutes.
I’m sure I’m not the only one in this situation buit I can’t seem to find something about this on the internet.
Thanks!
P.S: I already have an automation rule that shuts the garage door down if left open for 15 minutes.
One way to do it would be to use conditional visibility. The cover’s controls are normally hidden and only exposed in the UI if a switch is turned on. This prevents accidental openings/closings because you first have to set the switch on, then the cover’s controls become visible. You can even add a timer so that the switch turns itself after 30 seconds, thereby hiding the cover’s controls as well.
Conditional visibility exists in Lovelace. For the Frontend UI you have to add the Custom UI component to gain this functionality.
Here’s another example of its application. I only wish to see the state of doors and locks that are NOT closed/locked. So if it is closed/locked, it does not appear in my Frontend UI.
Similarly, I have a door with a powered lock but do not wish to allow control of the lock if the door is open. It makes no sense to allow someone to extend the deadbolt (lock the door) when the door is NOT closed. To prevent it, I conceal the lock controls from the UI when the door is open.
For my legacy UI I have something set up that @123 describes above, i.e. my ‘garage door cover’ is in a group called ‘group.garage_door’ and it’s triggered like this::
######################################################################
# Turn Visibility of Garage Door Cover OFF at HA Start
######################################################################
- alias: Hide Garage Door Cover at start
trigger:
platform: homeassistant
event: start
action:
service: homeassistant.turn_off
entity_id: input_boolean.garage_door_cover_visible
######################################################################
# Turn Visibility of Garage Door Cover OFF after 1min
######################################################################
- alias: Hide Garage Door Cover after 1min
trigger:
platform: state
entity_id: input_boolean.garage_door_cover_visible
to: 'on'
for:
minutes: '1'
action:
service: homeassistant.turn_off
entity_id: input_boolean.garage_door_cover_visible
######################################################################
# Show Garage Door Cover only when acvtivated
######################################################################
- alias: Visibility Garage Door Cover On
trigger:
platform: state
entity_id: input_boolean.garage_door_cover_visible
to: 'on'
action:
service: group.set_visibility
entity_id: group.garage_door
data:
visible: True
######################################################################
- alias: Visibility Garage Door Cover Off
trigger:
platform: state
entity_id: input_boolean.garage_door_cover_visible
to: 'off'
action:
service: group.set_visibility
entity_id: group.garage_door
data:
visible: False
I haven’t set up anything for Lovelace yet, but ‘toggle lock’ that @JTPublic mentions sounds like a great way to do it.
Since you haven’t mentioned what kind of phone you are using:
I have an Android with Tasker installed. There I have task for opening and closing. The key thing though is, that within those tasks I use the Authentication dialog to set the variable, and only make the REST call when authentication was successful. So to actually open I either have to provide my fingerprint or enter the password. To me this pretty much seems like a safe way of preventing unwanted actions.
Thanks for this suggestion. Does the garage door control requires to be in a group entity or could I use the garage door cover entity directly with this?
# Group for Garage Door Cover
garage_door:
name: Garage Door Cover
entities:
- cover.garage_door
# Group for Visibility of Garage Door Cover
garage_door_visible:
name: Garage Door Cover Visible
entities:
- input_boolean.garage_door_cover_visible