I use a fibaro smart implant on my garage door in combination to send an open/close/stop signal (the garage door controller itself opens/closes/stops using the same signal) and use a window/door sensor to determine if the door is closed.
My Google Assistant can see the device but I want to close the security flaw by being able to open the door by telling google to “close garage door” since it only requires the code for the command “open garage door”. Is there a way in HA to block the close command if the door is currently in the closed state? How could I accomplish this?
alias: Close Garage Door
sequence:
- condition: state
entity_id: sensor.garage_access_control_door_state
state: "22"
- repeat:
until:
- condition: state
entity_id: sensor.garage_access_control_door_state
state: Window/door is closed
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.garage_door_5
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
mode: single
icon: mdi:garage-variant
I timed the length of the garage door opening/closing and put the script on repeat until the door is closed which ensures the reattempts closing if something accidentally stops it from closing all the way.
I have to think about this repeat though because it prevents me from stopping the garage door midway (I haven’t been successful in triggering stop_cover) if I need to vent the garage without opening the door all the way and also could pose a problem if something is legitimately preventing the door from closing.