☂️ Awning Automation for Rain and Wind Protection


This automation automatically retracts your awnings to protect them from damage when rain or strong wind is detected. It continuously monitors specific weather sensors to react timely and avoid unnecessary wear or damage.

  • Rainfall intensity above 0.2 mm/hour
  • Wind speeds exceeding 20 km/h from sensitive directions
  • Wind gusts exceeding 30 km/h from critical directions

Before retracting, the automation verifies that at least one awning is currently extended (open). Notifications are sent immediately to your configured mobile devices whenever the awnings are retracted, including details about the weather conditions that triggered the action.

Note: Ensure your Home Assistant installation is integrated with reliable weather sensors providing rain rate, wind speed, gust, and wind direction data for accurate automation behavior.

🔧 Prerequisites

Before deploying this automation, verify the following entities exist and are properly integrated into your Home Assistant system:

  • sensor.gw2000a_rain_rate – Rainfall rate sensor (mm/hour)
  • sensor.gw2000a_wind_speed – Current wind speed sensor (km/h)
  • sensor.gw2000a_max_daily_gust – Maximum daily wind gust sensor (km/h)
  • sensor.gw2000a_wind_direction – Wind direction sensor (degrees, 0-360)
  • cover.shelly2pmg3_8cbfea9f0c90 and cover.markiese – Your awning cover entities
  • Notification services configured for your mobile devices (e.g., notify.mobile_app_iphone_von_jessica, notify.mobile_app_iphone_randy)

🔔 Automation: Retract Awnings on Rain or Strong Wind

The automation triggers when any of the defined weather thresholds are exceeded for at least one minute. It also includes wind direction checks to limit retraction only to critical wind directions, reducing unnecessary awning movement during harmless winds. Finally, the automation confirms if at least one awning is currently extended (state open) before attempting to retract.

alias: Retract Awnings on Rain or Wind
description: >
  Retracts awnings when rainfall exceeds 0.2 mm/h or strong winds from sensitive
  directions are detected. Only acts if awnings are currently open.
triggers:
  - platform: numeric_state
    entity_id: sensor.gw2000a_rain_rate
    above: 0.2
    for: "00:01:00"
  - platform: numeric_state
    entity_id: sensor.gw2000a_wind_speed
    above: 20
    for: "00:01:00"
  - platform: numeric_state
    entity_id: sensor.gw2000a_max_daily_gust
    above: 30
    for: "00:01:00"
conditions:
  - condition: or
    conditions:
      - condition: numeric_state
        entity_id: sensor.gw2000a_rain_rate
        above: 0.2
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.gw2000a_wind_speed
            above: 20
          - condition: template
            value_template: >
              {{ 190 < states('sensor.gw2000a_wind_direction')|float < 260 }}
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.gw2000a_wind_speed
            above: 30
          - condition: or
            conditions:
              - condition: numeric_state
                entity_id: sensor.gw2000a_wind_direction
                below: 190
              - condition: numeric_state
                entity_id: sensor.gw2000a_wind_direction
                above: 260
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.gw2000a_max_daily_gust
            above: 30
          - condition: or
            conditions:
              - condition: numeric_state
                entity_id: sensor.gw2000a_wind_direction
                below: 190
              - condition: numeric_state
                entity_id: sensor.gw2000a_wind_direction
                above: 260
  - condition: or
    conditions:
      - condition: state
        entity_id: cover.shelly2pmg3_8cbfea9f0c90
        state: 'open'
      - condition: state
        entity_id: cover.markiese
        state: 'open'
actions:
  - service: notify.mobile_app_iphone_von_jessica
    data:
      title: "Awning Automation"
      message: "Awnings are retracting due to rain or strong wind."
  - service: notify.mobile_app_iphone_randy
    data:
      title: "Awning Automation"
      message: "Awnings are retracting due to rain or strong wind."
  - choose:
      - conditions:
          - condition: state
            entity_id: cover.shelly2pmg3_8cbfea9f0c90
            state: 'open'
        sequence:
          - service: cover.close_cover
            target:
              entity_id: cover.shelly2pmg3_8cbfea9f0c90
      - conditions:
          - condition: state
            entity_id: cover.markiese
            state: 'open'
        sequence:
          - service: cover.close_cover
            target:
              entity_id: cover.markiese
mode: single

🔐 Notes & Best Practices

  • Modify entity IDs to match your own sensors and awning covers exactly.
  • Verify your rain and wind sensors provide accurate and up-to-date data.
  • Consider adding manual override buttons or conditions for maintenance or testing.
  • Test automation extensively to ensure it behaves as expected and does not cause unwanted awning movements.
  • Adjust notification targets (device names or services) to your preferred channels.
  • The automation uses mode: single to avoid interrupting an ongoing retraction if triggered multiple times in short succession.