---
title: "Умни щори: управление според слънцето, температурата и часа"
description: "Щори, които слизат сами при силно слънце и топла стая и се вдигат ръчно с едно натискане. Започваме с едно правило за една щора и мотор Aqara Roller Shade Driver E1."
canonical: "https://realhomeautomations.com/bg/projects/umni-shtori-upravlenie-spored-slantseto-temperaturata-i-chasa/"
language: bg-BG
updated: 2026-11-23T16:24:04+00:00
---

# Умни щори: управление според слънцето, температурата и часа

Щори, които слизат сами при силно слънце и топла стая и се вдигат ръчно с едно натискане. Започваме с едно правило за една щора и мотор Aqara Roller Shade Driver E1.

> Канонична HTML страница: https://realhomeautomations.com/bg/projects/umni-shtori-upravlenie-spored-slantseto-temperaturata-i-chasa/

- **Difficulty:** Средно ниво
- **Build time:** 60–90 минути
- **Време за четене:** 5 minutes

## Tools required

- Aqara Roller Shade Driver E1 (мотор за ролетна щора, Zigbee; по един на щора)
- Zigbee хъб или Home Assistant със Zigbee адаптер
- Температурен сензор в стаята (по желание)


## What readers will learn

- Да управляваш щора от Home Assistant и да знаеш как се чете позицията ѝ
- To link an action to the sun's height and direction
- To add a manual override that doesn't fight the automation


## Skill requirements

- Да сдвоиш Zigbee устройство в Home Assistant
- Да направиш автоматизация с тригер, условие и действие

## Комплект за проекта

- [Комплект за автоматизация на щори AQARA Roller Shade Driver E1, Zigbee (RSD-M01)](https://realhomeautomations.com/bg/produkt/blind-automation-kit-aqara-roller-shade-driver-e1-zigbee-rsd-m01/index.md)

Следобед слънцето пече право през прозореца и стаята се прегрява, а щората стои вдигната, защото никой не е у дома. Искаме щората да слиза сама, когато наистина има нужда, и да можем да я вдигнем с едно натискане, без да се караме с автоматизацията.

 ## Какво ще получим

 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.

 ## Какво ни трябва

- [Aqara Roller Shade Driver E1](https://realhomeautomations.com/bg/produkt/blind-automation-kit-aqara-roller-shade-driver-e1-zigbee-rsd-m01/): един мотор на щора. При няколко щори ни трябва по един мотор за всяка.
- 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 с Zigbee (ZHA или Zigbee2MQTT) и интеграцията Sun, която е част от стандартната конфигурация.
- По желание: температурен сензор в стаята. Без него работим само с час и слънце.

 Нужен е Zigbee хъб или Home Assistant със Zigbee адаптер.

 Време за настройка: около час за първата щора. После оставяме автоматизацията да работи няколко слънчеви дни и наблюдаваме.

 ## Как работи

 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.

 ## Как е у нас

 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.

 До леглата има бутони, които превключват щорите с едно натискане. Те са ръчният начин да отменим автоматизацията. Правилата по температура и височина на слънцето у нас не са настроени, затова примерът по-долу е ориентир, не копие на нашата конфигурация.

 ## Стъпки

- Добавяме мотора към Zigbee мрежата (ZHA или Zigbee2MQTT) и му даваме име по стаята. Очакваме ново entity от тип cover с позиция от 0 до 100, където 100 значи напълно отворена.
- 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.
- Създаваме помощник „Превключвател“ (input_boolean) за ръчна отмяна, например `input_boolean.blinds_manual_override` (примерно име).
- Записваме кои прозорци получават силно слънце и в кои часове. Правило за един прозорец е достатъчно за начало.
- Създаваме автоматизацията по примера и сменяме entity ID-тата с нашите.
- Чак след няколко предвидими дни добавяме второ условие, например облачност или по-висок праг на температурата.

 ```
# 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
```

 Ако изберем залез вместо температура, тригерът става `trigger: sun` със `event: sunset` и по желание `offset`, just like in the automation at Marto's.

 ## Проверка на резултата

- Нормален случай: в слънчев следобед, когато са изпълнени всички условия, щората слиза до избраната позиция. В Developer tools → States виждаме позицията да се сменя.
- 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` в Developer tools и коригираме azimuth.

 ## Ограничения и изключване

- We don't know whether someone is standing by the window.
- Облачност и сянка от съседни сгради не се отчитат, ако не добавим тяхно условие.
- 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.
- Изключваме правилото с превключвателя за ръчна отмяна или го спираме от Settings → Automations.

 ## Източници и статус на проверката

 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/)