This feels like a simple requirement but I’m left scratching my head!
I have some electric blinds on a number of doors and I want to stop them from closing when the doors are open. I can do this via an automation quite simply based on a condition linked to the state of the door sensors BUT how can I block adhoc activity via a Google/Nest voice command or the HomeAssistant UI? ie if someone issues the command to manually close the blinds it won’t be acted upon if the door sensor is open? (and optionally a voice response could alert that the blinds were not closed due to the door being open).
I’m sure there’s a very simple solution here but I’d appreciate any guidance please.
Many thanks
P.S. Apologies if there’s a more suitable sub forum to post this in…
I make the assumption that your “Hey Google” command activates an HA automation. That is Home Assistant must be running for the blind to be operated. As you seem to be aware, a conditional in the trigger section will do what you want.
If the blinds can be independently operated by either Google or HA, I would suggest a sock in the mouth of the one who uttered the command. (Sorry for the sarcasm, I just couldn’t resist.)
I am very biased in that I am not a fan of cloud based devices. With that understanding I advise you to ditch Google.
Yes HA is exposing the blinds to Google Home. Gemini suggested that I used a Template Cover for the blinds and ‘hide’ the originals. This essentially creates a virtual blind that I’d then expose to Google etc
This is the sample YAML that it came up with:
cover:
- platform: template
covers:
safe_living_room_blinds:
device_class: blind
friendly_name: "Living Room Blinds"
value_template: "{{ states('cover.actual_blinds_id') }}"
open_cover:
service: cover.open_cover
target:
entity_id: cover.actual_blinds_id
close_cover:
# This is the "Restriction" logic
choose:
- conditions:
- condition: state
entity_id: binary_sensor.door_sensor_id
state: "off" # Only proceeds if door is closed
sequence:
- service: cover.close_cover
target:
entity_id: cover.actual_blinds_id
- conditions:
- condition: state
entity_id: binary_sensor.door_sensor_id
state: "on" # If door is open, send a notification instead
sequence:
- service: notify.mobile_app_your_phone
data:
title: "Action Blocked"
message: "Cannot close blinds while the door is open!"
stop_cover:
service: cover.stop_cover
target:
entity_id: cover.actual_blinds_id
I’ve not had a chance to try this yet but does this sound viable?
The unavailable state is not covered.
But apart from that, it should probably work.
I would probably replace the second conditions: with a default.
That would mean it defaults to notify on anything else than door is closed.
Normally it won’t make a difference, but in case the door sensor is not available (battery died or whatever) then there will be nothing from this action as it is here.
Or have the default as an other error message.
cover:
- platform: template
covers:
safe_living_room_blinds:
device_class: blind
friendly_name: "Living Room Blinds"
value_template: "{{ states('cover.actual_blinds_id') }}"
open_cover:
service: cover.open_cover
target:
entity_id: cover.actual_blinds_id
close_cover:
# This is the "Restriction" logic
choose:
- conditions:
- condition: state
entity_id: binary_sensor.door_sensor_id
state: "off" # Only proceeds if door is closed
sequence:
- service: cover.close_cover
target:
entity_id: cover.actual_blinds_id
- conditions:
- condition: state
entity_id: binary_sensor.door_sensor_id
state: "on" # If door is open, send a notification instead
sequence:
- service: notify.mobile_app_your_phone
data:
title: "Action Blocked"
message: "Cannot close blinds while the door is open!"
default:
- service: notify.mobile_app_your_phone
data:
title: "Action Blocked"
message: "Something else is wrong with the door sensor."
stop_cover:
service: cover.stop_cover
target:
entity_id: cover.actual_blinds_id
While the solution of using a choose with conditions in the close action is sound, AI has typically suggested outdated and since 2025.12 now deprecated code (- platform: template)