---
title: "Smart blinds: control by the sun, the temperature and the time"
description: "Blinds that come down by themselves in strong sun and a warm room and go up by hand with one press. We start with one rule for one blind and an Aqara Roller Shade Driver E1 motor."
canonical: "https://realhomeautomations.com/en/projects/smart-blinds-sun-temperature-time/"
language: en-US
updated: 2026-11-23T16:24:04+00:00
---

# Smart blinds: control by the sun, the temperature and the time

Blinds that come down by themselves in strong sun and a warm room and go up by hand with one press. We start with one rule for one blind and an Aqara Roller Shade Driver E1 motor.

> Canonical HTML page: https://realhomeautomations.com/en/projects/smart-blinds-sun-temperature-time/

- **Difficulty:** Intermediate
- **Build time:** 60–90 minutes
- **Reading time:** 5 minutes

## Tools required

- Aqara Roller Shade Driver E1 (motor for a roller blind, Zigbee; one per blind)
- Zigbee hub or Home Assistant with a Zigbee adapter
- Temperature sensor in the room (optional)


## What readers will learn

- To control a blind from Home Assistant and know how its position is read
- To link an action to the sun's height and direction
- To add a manual override that doesn't fight the automation


## Skill requirements

- To pair a Zigbee device in Home Assistant
- To build an automation with a trigger, a condition and an action

## Project kit

- [Blind automation kit AQARA Roller Shade Driver E1, Zigbee (RSD-M01)](https://realhomeautomations.com/en/product/blind-automation-kit-aqara-roller-shade-driver-e1-zigbee-rsd-m01/index.md)

In the afternoon the sun beats straight through the window and the room overheats, while the blind stays up because nobody is home. We want the blind to come down by itself when it is really needed, and to be able to raise it with one press without fighting the automation.

 ## What we will get

 A motorised blind that Home Assistant controls by three signals: time (for example sunset), the sun's direction and height, and the room temperature. We start with one rule for one blind and add conditions one by one.

 Project boundary: we don't touch the electrical installation. The motor runs on a battery and attaches to the blind itself. It doesn't detect obstacles and people, so we don't let it run on its own where a child or an animal could get caught.

 ## What we need

- [Aqara Roller Shade Driver E1](https://realhomeautomations.com/bg/produkt/blind-automation-kit-aqara-roller-shade-driver-e1-zigbee-rsd-m01/): one blind motor. With several blinds we need one motor for each.
- A roller blind that the motor can drive. According to the manufacturer the motor attaches to the blind's chain; before buying we check the chain type and the blind's weight in the product description.
- Home Assistant with Zigbee (ZHA or Zigbee2MQTT) and the Sun integration, which is part of the standard configuration.
- Optional: a temperature sensor in the room. Without it we work only with time and sun.

 You need a Zigbee hub or Home Assistant with a Zigbee adapter.

 Setup time: about an hour for the first blind. Then we let the automation run for a few sunny days and observe.

 ## How it works

 The sun is different for every window. That is why we don't copy one time for all rooms. The entity `sun.sun` gives the sun's height (elevation) and direction (azimuth). A positive height means the sun is above the horizon. The direction is in degrees clockwise from north, so a window facing south looks toward about 180°.

 The logic is simple: if the room is warm, the sun is above a certain height and shines on our window, we lower the blind to a partly closed position. If we have raised the blind by hand, the automation doesn't touch it until the next day.

 ## How it is at our place

 Marto's Home Assistant has six Aqara Roller Shade Driver E1 motors in the bedroom, grouped in one entity `cover.bedroom_blinds`. The automation "Close the blinds on sun set" closes all the blinds in the bedroom zone one hour after sunset (trigger "sun", event "sunset", offset +01:00:00). There are no conditions.

 By the beds there are buttons that toggle the blinds with one press. They are the manual way to override the automation. The rules by temperature and sun height are not set up at our place, so the example below is a guide, not a copy of our configuration.

 ## Steps

- We add the motor to the Zigbee network (ZHA or Zigbee2MQTT) and name it after the room. We expect a new entity of type cover with a position from 0 to 100, where 100 means fully open.
- We set the blind's end positions following the manufacturer's guide. We check from Home Assistant that "open" and "close" reach the same ends.
- We create a Toggle helper (input_boolean) for the manual override, for example `input_boolean.blinds_manual_override` (an example name).
- We write down which windows get strong sun and at which hours. A rule for one window is enough to start.
- We create the automation from the example and replace the entity IDs with ours.
- Only after a few predictable days do we add a second condition, for example cloud cover or a higher temperature threshold.

 ```
# Example: add it in a new automation (Edit in YAML).
# All entity IDs and numbers are examples, replace them with your own.
alias: Blind down in strong sun and a warm room
triggers:
  - trigger: numeric_state
    entity_id: sensor.living_room_temperature
    above: 26
conditions:
  - condition: numeric_state
    entity_id: sun.sun
    attribute: elevation
    above: 20
  - condition: numeric_state
    entity_id: sun.sun
    attribute: azimuth
    above: 150
    below: 250
  - condition: state
    entity_id: input_boolean.blinds_manual_override
    state: "off"
actions:
  - action: cover.set_cover_position
    target:
      entity_id: cover.living_room_blind
    data:
      position: 30
mode: single
```

 If we choose sunset instead of temperature, the trigger becomes `trigger: sun` with `event: sunset` and optionally `offset`, just like in the automation at Marto's.

 ## Checking the result

- Normal case: on a sunny afternoon, when all the conditions are met, the blind comes down to the chosen position. In Developer tools → States we see the position change.
- Edge case: we raise the blind by hand and turn on the manual override. The automation shouldn't lower it again.
- Missing data: if the temperature sensor is "unavailable", the condition isn't met and the blind doesn't move. That way an error leads to a motionless blind, not to unexpected movement.

 ## If it doesn't work

- The blind doesn't react → the motor is out of range of the Zigbee network or the battery is weak → we check its state and charge the battery.
- The automation doesn't start → the trigger crosses the threshold only once while the temperature stays above it → we look at the automation's traces (Settings → Automations → Traces).
- The blind comes down at the wrong time → the window's direction is different from the expected → we look at the actual values of `sun.sun` in Developer tools and correct the azimuth.

 ## Limitations and switching off

- We don't know whether someone is standing by the window.
- Cloud cover and the shade of neighbouring buildings are not taken into account unless we add a condition for them.
- Without Home Assistant or the Zigbee network the automation doesn't work. The blind can be operated by hand with the chain, and with a battery also with the button according to the manufacturer's guide.
- We switch off the rule with the manual override switch or stop it from Settings → Automations.

 ## Sources and verification status

 Checked against the Home Assistant documentation, 22.11.2026, and a read-only reading of Marto's Home Assistant (see ha-evidence).

- [Home Assistant: Sun (the sun's height and direction)](https://www.home-assistant.io/integrations/sun/)
- [Home Assistant: Sun trigger](https://www.home-assistant.io/docs/automation/trigger/#sun-trigger)
- [Home Assistant: Cover](https://www.home-assistant.io/integrations/cover/)
- [Home Assistant: Zigbee Home Automation](https://www.home-assistant.io/integrations/zha/)