Roller shutters and door sensors

Hi,

I have some Fibaro roller shutters which I close automatically in the evening. I have also some Sensative Stripes for door/window sensors and I would like to combine them.

Currently I have the following automation:

alias: Sunset Roller Shutter (All)
description: ''
trigger:
  - platform: sun
    event: sunset
    offset: '00:20:00'
condition: []
action:
  - service: cover.close_cover
    data: {}
    entity_id:
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_18
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_17
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_16
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_20
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_12
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_13
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_11
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_3
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_2
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_4
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_8
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_5
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_6
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_7
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_9
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_10
mode: single

Some of the roller shutters are are for doors and I don´t want to close the roller shutter if the door sensor is open.
How can I add the status of the door sensor into this rule?

I thinkinh about something like this:

alias: Sunset Roller Shutter (All)
description: ''
trigger:
  - platform: sun
    event: sunset
    offset: '00:20:00'
condition: []
action:
  - service: cover.close_cover
    data: {}
    entity_id:
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_18
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_17
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_16
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_20
      if door_sensor_1 = close (
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_12
      ) else
        sent push notification to my mobile
      )
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_13
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_11
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_3
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_2
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_4
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_8
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_5
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_6
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_7
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_9
      - cover.fibaro_system_fgrm222_roller_shutter_controller_2_level_10
mode: single

Is that possible or how do I solve that?

It is possible to add conditions to the actions. All actions below the condition will only run if the condition is met. It is described in the action-part of the documentation: https://www.home-assistant.io/docs/automation/action/

1 Like