Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Custom integration for Home Assistant that controls roller shutters and blinds a

It typically replaces a bundle of YAML automations with many helpers (input_boolean, input_number, timer) for sun protection, auto up, evening run, closing after the window was closed, ventilation, override and vacation.

> Status: version 0.7.1.
> Status: version 0.8.0.

## How it works

Expand Down Expand Up @@ -42,7 +42,9 @@ The integration is event driven: it only reacts to state changes of the configur

### Weather protection

* **Wind and rain:** globally a wind sensor with a threshold (in the unit of the sensor) and a rain sensor (on/off or an amount above a threshold). Per window a **position with wind** and **with rain**, empty = not affected (e.g. external venetian blinds to 100 % with wind, a roof window to 0 % with rain). An **own wind threshold** on a window replaces the global threshold for that window (e.g. a balcony shutter already from 50 km/h, the others only from 75 km/h); it has its own release time, and the wind protection binary sensor is on while any window is protected (attribute `windows`). The protection starts at once and moves the affected covers to their position, **also during an override and with the automatic off** (not during the restart protection; caught up afterwards). Wind comes before rain. An open window only prevents closing; it is caught up as soon as the window is closed.
* **Switched on per window:** the weather protection only acts on windows with **weather protection for this window** on (default off). Without it, wind, rain and frost never move or limit the cover, even with positions entered (they are kept).
* **Automatic off = no weather protection:** with the automatic off (globally or for the window) the weather protection does not move either; a running protection ends for these windows without a movement. If the automatic is turned on again while the protection still runs, the covers move to their protection position.
* **Wind and rain:** globally a wind sensor with a threshold (in the unit of the sensor) and a rain sensor (on/off or an amount above a threshold). Per window a **position with wind** and **with rain**, empty = not affected (e.g. external venetian blinds to 100 % with wind, a roof window to 0 % with rain). An **own wind threshold** on a window replaces the global threshold for that window (e.g. a balcony shutter already from 50 km/h, the others only from 75 km/h); it has its own release time, and the wind protection binary sensor is on while any window is protected (attribute `windows`). The protection starts at once and moves the affected covers to their position once, **also during an override** (not during the restart protection; caught up afterwards). A cover moved by hand during the protection keeps that position: saving settings (reload) does not move covers that are already protected again. Wind comes before rain. An open window only prevents closing; it is caught up as soon as the window is closed.
* **While the protection runs,** all other rules of the window rest (status "Weather protection"). It ends only after the value stayed on the safe side for the **release time** (default 15 min). An unavailable sensor never ends a protection. Afterwards the automatic decides again (sun protection, evening run); the old position is not restored.
* **Frost:** windows with a **lowest position with frost** (e.g. 5 %) close only down to it while the outdoor temperature is at or below the frost threshold (default 1 °C), so the cover cannot freeze on. This applies to all automatic movements and services, not to the wind and rain protection.
* Start and end are written to the logbook, plus the event `shutter_assistant_protection` with `kind` (wind, rain, frost) and `active`.
Expand Down Expand Up @@ -153,7 +155,7 @@ Values are checked exactly like in the dialogs (same ranges, units and rules). T

1. **Window:** name, cover, window contacts (also window handles), tilt contacts, group (no group = no sun protection).
2. **Sun protection:** thresholds for the sensor types of the group, outdoor temperature at least (19 °C), hold times temperature (10 min) and sun (5 min), room temperature (thermostat: too warm from setpoint + 2 K, sensor: from 24 °C), air conditioner, sun protection position (10 %), tolerance for auto up (5 %), auto up, notification about an open window, manual sun protection up to (25 %), detection period (5 min), follow-up (5 min), moving onto the sun protection position counts.
3. **Behaviour:** override (60 min, sunrise, evening and vacation runs despite override), additional conditions, evening (evening run, evening position 0 %, close after window closed, own evening times), ventilation (30 %, counts as closed up to 5 %, 3 s in the evening, 60 s during the day), vacation simulation, weather protection & door (position with wind, own wind threshold, position with rain, lowest position with frost, lockout protection).
3. **Behaviour:** override (60 min, sunrise, evening and vacation runs despite override), additional conditions, evening (evening run, evening position 0 %, close after window closed, own evening times), ventilation (30 %, counts as closed up to 5 %, 3 s in the evening, 60 s during the day), vacation simulation, weather protection & door (weather protection for this window, position with wind, own wind threshold, position with rain, lowest position with frost, lockout protection).
4. **Morning opening:** on or off, mode and period, then the settings of the mode.

Positions: 100 % = open, 0 % = closed.
Expand All @@ -174,7 +176,7 @@ Per window (own device):
* Sensor **Status** (weather protection, automatic off, restart protection, manual override, closed for the evening, sun protection, vacation simulation, ready)
* Sensor **Last reason** (text, code, position, time)
* Sensor **Next action** (point in time, attribute `action`: evening run, morning opening, end of the override, sun enters or leaves the sector, weather protection may end)
* Switches **Automatic** (only this window; the weather protection keeps working) and **Sun protection** (off = not lowered for the sun; covers already lowered open again as usual), both survive restarts
* Switches **Automatic** (only this window; off = no weather protection either) and **Sun protection** (off = not lowered for the sun; covers already lowered open again as usual), both survive restarts
* Binary sensors **Manual override** (with end), **Sun condition** (with partial conditions), **Sun protection today**, **Closed this evening**

For control cards on a dashboard, **Sun condition** (thresholds, sensors, azimuth sector, hold times and when they end) and **Status** (cover, window contacts, evening start, override end) provide all values as attributes. **Evening mode** has the start and end of the current or next evening, **Automatic** the end of a running restart protection.
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Custom Integration für Home Assistant, die Rollos und Raffstores automatisch st

Die Integration ersetzt typischerweise ein Bündel von YAML-Automationen mit vielen Helfern (input_boolean, input_number, timer) für Sonnenschutz, Auto-Hoch, Abendlauf, Nachziehen, Lüften, Übersteuerung und Urlaub.

> Status: Version 0.7.1.
> Status: Version 0.8.0.

## Funktionsweise

Expand Down Expand Up @@ -42,7 +42,9 @@ Die Integration arbeitet ereignisgesteuert: Sie reagiert nur auf Zustandswechsel

### Wetterschutz

* **Wind und Regen:** global ein Windsensor mit Schwelle (in der Einheit des Sensors) und ein Regensensor (an/aus oder eine Menge über einer Schwelle). Pro Fenster eine **Position bei Wind** und **bei Regen**, leer = nicht betroffen (z. B. Raffstores bei Wind auf 100 %, ein Dachfenster bei Regen auf 0 %). Eine **eigene Windschwelle** am Fenster ersetzt für dieses Fenster die globale Schwelle (z. B. ein Balkonrollo schon ab 50 km/h, die übrigen erst ab 75 km/h); sie hat eine eigene Freigabezeit, und der Binärsensor Windschutz ist an, solange irgendein Fenster geschützt wird (Attribut `windows`). Der Schutz beginnt sofort und fährt die betroffenen Rollos auf ihre Position, **auch bei Übersteuerung und ausgeschalteter Automatik** (nicht im Neustart-Schutz, danach nachgeholt). Wind geht vor Regen. Ein offenes Fenster verhindert nur Schließfahrten; sie werden nachgeholt, sobald es zu ist.
* **Pro Fenster einschalten:** Der Wetterschutz wirkt nur auf Fenster, bei denen **Wetterschutz für dieses Fenster** eingeschaltet ist (Standard aus). Ohne den Schalter fahren oder begrenzen Wind, Regen und Frost das Rollo nie, auch wenn Positionen eingetragen sind (sie bleiben erhalten).
* **Automatik aus = kein Wetterschutz:** Ist die Automatik aus (global oder für das Fenster), fährt auch der Wetterschutz nicht; ein laufender Schutz endet für diese Fenster ohne Fahrt. Wird die Automatik wieder eingeschaltet, während der Schutz noch läuft, fahren die Rollos auf ihre Schutzposition.
* **Wind und Regen:** global ein Windsensor mit Schwelle (in der Einheit des Sensors) und ein Regensensor (an/aus oder eine Menge über einer Schwelle). Pro Fenster eine **Position bei Wind** und **bei Regen**, leer = nicht betroffen (z. B. Raffstores bei Wind auf 100 %, ein Dachfenster bei Regen auf 0 %). Eine **eigene Windschwelle** am Fenster ersetzt für dieses Fenster die globale Schwelle (z. B. ein Balkonrollo schon ab 50 km/h, die übrigen erst ab 75 km/h); sie hat eine eigene Freigabezeit, und der Binärsensor Windschutz ist an, solange irgendein Fenster geschützt wird (Attribut `windows`). Der Schutz beginnt sofort und fährt die betroffenen Rollos einmal auf ihre Position, **auch bei Übersteuerung** (nicht im Neustart-Schutz, danach nachgeholt). Wer ein Rollo während des Schutzes von Hand verfährt, behält diese Position: Speichern von Einstellungen (Neuladen) fährt bereits geschützte Rollos nicht erneut. Wind geht vor Regen. Ein offenes Fenster verhindert nur Schließfahrten; sie werden nachgeholt, sobald es zu ist.
* **Solange der Schutz läuft,** ruhen alle anderen Regeln für das Fenster (Status „Wetterschutz“). Er endet erst, wenn der Wert die **Freigabezeit** (Standard 15 min) lang wieder im sicheren Bereich war. Ein nicht verfügbarer Sensor beendet nie einen Schutz. Danach entscheidet die Automatik neu (Sonnenschutz, Abendlauf); die alte Position wird nicht wiederhergestellt.
* **Frost:** Fenster mit einer **tiefsten Position bei Frost** (z. B. 5 %) schließen bei einer Außentemperatur bis zur Frostschwelle (Standard 1 °C) nur bis dorthin, damit das Rollo nicht anfriert. Das gilt für alle automatischen Fahrten und Services, nicht für den Wind- und Regenschutz.
* Ein- und Ende stehen im Logbuch, dazu das Ereignis `shutter_assistant_protection` mit `kind` (wind, rain, frost) und `active`.
Expand Down Expand Up @@ -153,7 +155,7 @@ Die Werte werden genauso geprüft wie in den Dialogen (gleiche Bereiche, Einheit

1. **Fenster:** Name, Rollo, Fensterkontakte (auch Fenstergriffe), Kipp-Kontakte, Gruppe (ohne Gruppe kein Sonnenschutz).
2. **Sonnenschutz:** Schwellen für die Sensortypen der Gruppe, Außentemperatur mindestens (19 °C), Haltezeiten Temperatur (10 min) und Sonne (5 min), Raumtemperatur (Thermostat: zu warm ab Sollwert + 2 K, Sensor: ab 24 °C), Klimaanlage, Sonnenschutz-Position (10 %), Toleranz für Auto-Hoch (5 %), Auto-Hoch, Benachrichtigung bei offenem Fenster, manueller Sonnenschutz bis (25 %), Erkennungszeitraum (5 min), Nachlauf (5 min), Fahrt auf Sonnenschutz-Position zählt.
3. **Verhalten:** Übersteuerung (60 min, Sonnenaufgang, Abend- und Urlaubsfahrten trotz Übersteuerung), Zusatzbedingungen, Abend (Abendlauf, Abendposition 0 %, Nachziehen, eigene Abendzeiten), Lüften (30 %, gilt als geschlossen bis 5 %, 3 s abends, 60 s tagsüber), Urlaubssimulation, Wetterschutz & Tür (Position bei Wind, eigene Windschwelle, Position bei Regen, tiefste Position bei Frost, Aussperrschutz).
3. **Verhalten:** Übersteuerung (60 min, Sonnenaufgang, Abend- und Urlaubsfahrten trotz Übersteuerung), Zusatzbedingungen, Abend (Abendlauf, Abendposition 0 %, Nachziehen, eigene Abendzeiten), Lüften (30 %, gilt als geschlossen bis 5 %, 3 s abends, 60 s tagsüber), Urlaubssimulation, Wetterschutz & Tür (Wetterschutz für dieses Fenster, Position bei Wind, eigene Windschwelle, Position bei Regen, tiefste Position bei Frost, Aussperrschutz).
4. **Morgenöffnung:** an oder aus, Modus und Zeitfenster, danach die Einstellungen des Modus.

Positionen: 100 % = offen, 0 % = zu.
Expand All @@ -174,7 +176,7 @@ Je Fenster (eigenes Gerät):
* Sensor **Status** (Wetterschutz, Automatik aus, Neustart-Schutz, Manuelle Übersteuerung, Abends geschlossen, Sonnenschutz, Urlaubssimulation, Bereit)
* Sensor **Letzter Grund** (Text, Code, Position, Zeit)
* Sensor **Nächste Aktion** (Zeitpunkt, Attribut `action`: Abendlauf, Morgenöffnung, Ende der Übersteuerung, Sonne kommt in oder verlässt den Bereich, Wetterschutz kann enden)
* Schalter **Automatik** (nur dieses Fenster; der Wetterschutz läuft weiter) und **Sonnenschutz** (aus = bei Sonne nicht absenken; schon abgesenkte Rollos öffnen wieder wie gewohnt), beide bleiben über Neustarts erhalten
* Schalter **Automatik** (nur dieses Fenster; aus = auch kein Wetterschutz) und **Sonnenschutz** (aus = bei Sonne nicht absenken; schon abgesenkte Rollos öffnen wieder wie gewohnt), beide bleiben über Neustarts erhalten
* Binärsensoren **Manuelle Übersteuerung** (mit Ende), **Sonnenbedingung** (mit Teilbedingungen), **Sonnenschutz heute**, **Abends geschlossen**

Für Kontroll-Karten im Dashboard liefern **Sonnenbedingung** (Schwellen, Sensoren, Azimut-Bereich, Haltezeiten und wann sie ablaufen) und **Status** (Rollo, Fensterkontakte, Abendbeginn, Übersteuerung bis) alle Werte als Attribute. **Abendmodus** hat Beginn und Ende des aktuellen oder nächsten Abends, **Automatik** das Ende eines laufenden Neustart-Schutzes.
Expand Down
4 changes: 3 additions & 1 deletion custom_components/shutter_assistant/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
CONF_VENTILATION,
CONF_VERIFY_AFTER,
CONF_WEATHER,
CONF_WEATHER_PROTECTION,
CONF_WEEKEND_DAYS,
CONF_WIND_ENTITY,
CONF_WIND_POSITION,
Expand Down Expand Up @@ -800,8 +801,9 @@ def window_ventilation_fields(values: dict[str, Any]) -> dict[Any, Any]:


def window_protection_fields(values: dict[str, Any]) -> dict[Any, Any]:
"""Weather protection (empty = not affected) and the lockout protection."""
"""Weather protection (switch, positions: empty = not affected) and the lockout protection."""
return {
_wreq(CONF_WEATHER_PROTECTION, values): BooleanSelector(),
_opt(CONF_WIND_POSITION, values): _number(0, 100, 1, "%"),
_opt(CONF_WINDOW_WIND_THRESHOLD, values): _number(0, 300, 0.5),
_opt(CONF_RAIN_POSITION, values): _number(0, 100, 1, "%"),
Expand Down
5 changes: 4 additions & 1 deletion custom_components/shutter_assistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@
# as window contacts) and the lockout protection of doors.
CONF_TILT_SENSORS = "tilt_sensors"
CONF_LOCKOUT = "lockout_protection"
# Weather protection per window (empty = not affected / off).
# Weather protection per window: only with this switch on, then the positions
# (empty = not affected / off).
CONF_WEATHER_PROTECTION = "weather_protection"
CONF_WIND_POSITION = "wind_position"
# own wind threshold of the window (empty = the global threshold)
CONF_WINDOW_WIND_THRESHOLD = "window_wind_threshold"
Expand Down Expand Up @@ -253,6 +255,7 @@
CONF_WINDOW_SENSORS: [],
CONF_TILT_SENSORS: [],
CONF_LOCKOUT: False,
CONF_WEATHER_PROTECTION: False,
CONF_PV_THRESHOLD: 130.0,
CONF_LUX_THRESHOLD: 14500.0,
CONF_RADIATION_THRESHOLD: 150.0,
Expand Down
Loading
Loading