Home

Awesome

Version

logo logo

Adaptive Cover

This Custom-Integration provides sensors for vertical and horizontal blinds based on the sun's position by calculating the position to filter out direct sunlight.

This integration builds upon the template sensor from this forum post Automatic Blinds

Features

Installation

HACS (Recommended)

Add https://github.com/basbruss/adaptive-cover as custom repository to HACS. Search and download Adaptive Cover within HACS.

Restart Home-Assistant and add the integration.

Manual

Download the adaptive_cover folder from this github. Add the folder to config/custom_components/.

Restart Home-Assistant and add the integration.

Setup

Adaptive Cover supports (for now) three types of covers/blinds; Vertical and Horizontal and Venetian (Tilted) blinds. Each type has its own specific parameters to setup a sensor. To setup the sensor you first need to find out the azimuth of the window(s). This can be done by finding your location on Open Street Map Compass.

Cover Types

VerticalHorizontalTilted
alt textalt textalt text
MovementUp/DownIn/OutTilting
variablesvariablesvariables

Modes

This component supports two strategy modes: A basic mode and a climate comfort/energy saving mode that works with presence and temperature detection.

  graph TD

  A[("fa:fa-sun Sundata")]
  A --> B["Basic Mode"]
  A --> C["Climate Mode"]

  subgraph "Basic Mode"
      B --> BA("Sun within field of view")

      BA --> |No| BC{{Default}}
      BC --> BE("Time between sunset and sunrise?")
      BE --> |Yes| BF["Return default"]
      BE --> |No| BG["Return Sunset default"]

      BA --> |Yes| BD("Elevation above 0?")
      BD --> |Yes| BH{{"Calculated Position"}}
      BD --> |No| BC
  end

  subgraph "Climate Mode"
      C --> CA("Check Presence")
  end

  subgraph "Occupants"
      CA --> |True| CB("Temperature above maximum comfort (summer)?")

      CB --> |Yes| CD("Transparent blind?")
      CB --> |No| CE("Lux/Irradiance below threshold or Weather is not sunny?")

      CD --> |Yes| CF["Return fully closed (0%)"]
      CD --> |No| B

      CE --> |Yes| CG("Temperature below minimum comfort (winter) and sun infront of window and elevation > 0?")
      CE --> |No| B

      CG --> |Yes| CH["Return fully open (100%)"]
      CG --> |No| BC
  end

  subgraph "No Occupants"
      CA --> |False| CC("Sun infront of window and elevation > 0?")
      CC --> |No| BC
      CC --> |Yes| CI("Temperature above maximum comfort (summer)?")
      CI --> |Yes| CF
      CI --> |No| CJ("Temperature below minimum comfort (winter)")
      CJ --> |Yes| CH
      CJ --> |No| BC
  end

Basic mode

This mode uses the calculated position when the sun is within the specified azimuth range of the window. Else it defaults to the default value or after sunset value depending on the time of day.

Climate mode

This mode calculates the position based on extra parameters for presence, indoor temperature, minimal comfort temperature, maximum comfort temperature and weather (optional). This mode is split up in two types of strategies; Presence and No Presence.

Climate strategies

Variables

Common

VariablesDefaultRangeDescription
Entities[]Denotes entities controllable by the integration
Window Azimuth1800-359The compass direction of the window, discoverable via Open Street Map Compass
Default Position600-100Initial position of the cover in the absence of sunlight glare detection
Minimal Position1000-99Minimal opening position for the cover, suitable for partially closing certain cover types
Maximum Position1001-100Maximum opening position for the cover, suitable for partially opening certain cover types
Field of view Left901-90Unobstructed viewing angle from window center to the left, in degrees
Field of view Right901-90Unobstructed viewing angle from window center to the right, in degrees
Minimal ElevationNone0-90Minimal elevation degree of the sun to be considered
Maximum ElevationNone1-90Maximum elevation degree of the sun to be considered
Default position after Sunset00-100Cover's default position from sunset to sunrise
Offset Sunset time0Additional minutes before/after sunset
Offset Sunrise time0Additional minutes before/after sunrise
Inverse StateFalseCalculates inverse state for covers fully closed at 100%

Vertical

VariablesDefaultRangeDescription
Window Height2.10.1-6Length of fully extended cover/window
Workarea Distance0.50.1-2The distance to the workarea on equal height to the bottom of the cover when fully extended

Horizontal

VariablesDefaultRangeDescription
Awning Height20.1-6Height from work area to awning mounting point
Awning Length (horizontal)2.10.3-6Length of the awning when fully extended
Awning Angle00-45Angle of the awning from the wall
Workarea Distance0.50.1-2Distance to the work area

Tilt

VariablesDefaultRangeDescription
Slat Depth30.1-15Width of each slat
Slat Distance20.1-15Vertical distance between two slats in horizontal position
Tilt ModeBi-directional

Automation

VariablesDefaultRangeDescription
Minimum Delta Position11-90Minimum position change required before another change can occur
Minimum Delta Time2Minimum time gap between position change
Start Time"00:00:00"Earliest time a cover can be adjusted after midnight
Start Time EntityNoneThe earliest moment a cover may be changed after midnight. Overrides the start_time value
Manual Override Duration15 minMinimum duration for manual control status to remain active
Manual Override reset TimerFalseResets duration timer each time the position changes while the manual control status is active
Manual Override ThresholdNone1-99Minimal position change to be recognized as manual change
Manual Override ignore intermediate statesFalseIgnore StateChangedEvents that have state opening or closing
End Time"00:00:00"Latest time a cover can be adjusted each day
End Time EntityNoneThe latest moment a cover may be changed . Overrides the end_time value
Adjust at end timeFalseMake sure to always update the position to the default setting at the end time.

Climate

VariablesDefaultRangeExampleDescription
Indoor Temperature EntityNoneclimate.living_room | sensor.indoor_temp
Minimum Comfort Temperature210-86
Maximum Comfort Temperature250-86
Outdoor Temperature EntityNonesensor.outdoor_temp
Outdoor Temperature ThresholdNoneIf the minimum outside temperature for summer mode is set and the outside temperature falls below this threshold, summer mode will not be activated.
Presence EntityNone
Weather EntityNoneweather.homeCan also serve as outdoor temperature sensor
Lux EntityNonesensor.luxReturns measured lux
Lux Threshold1000"In non-summer, above threshold, use optimal position. Otherwise, default position or fully open in winter."
Irradiance EntityNonesensor.irradianceReturns measured irradiance
Irradiance Threshold300"In non-summer, above threshold, use optimal position. Otherwise, default position or fully open in winter."

Blindspot

VariablesDefaultRangeExampleDescription
Blind Spot LeftNone0-max(fov_right, 180)Start point of the blind spot on the predefined field of view, where 0 is equal to the window azimuth - fov left.
Blind Spot RightNone1-max(fov_right, 180)End point of the blind spot on the predefined field of view, where 1 is equal to the window azimuth - fov left + 1 .
Blind Spot ElevationNone0-90Minimal elevation of the sun for the blindspot area.

Entities

The integration dynamically adds multiple entities based on the used features.

These entities are always available:

EntitiesDefaultDescription
sensor.{type}_cover_position_{name}Reflects the current state determined by predefined settings and factors such as sun position, weather, and temperature
sensor.{type}_control_method_{name}intermediateIndicates the active control strategy based on weather conditions. Options include winter, summer, and intermediate
sensor.{type}_start_sun_{name}Shows the starting time when the sun enters the window's view, with an interval of every 5 minutes.
sensor.{type}_end_sun_{name}Indicates the ending time when the sun exits the window's view, with an interval of every 5 minutes.
binary_sensor.{type}_manual_override_{name}offIndicates if manual override is engaged for any blinds.
binary_sensor.{type}_sun_infront_{name}offIndicates whether the sun is in front of the window within the designated field of view.
switch.{type}_toggle_control_{name}onActivates the adaptive control feature. When enabled, blinds adjust based on calculated position, unless manually overridden.
switch.{type}_manual_override_{name}onEnables detection of manual overrides. A cover is marked if its position differs from the calculated one, resetting to adaptive control after a set duration.
button.{type}_reset_manual_override_{name}onResets manual override tags for all covers; if switch.{type}_toggle_control_{name} is on, it also restores blinds to their correct positions.

When climate mode is setup you will also get these entities:

EntitiesDefaultDescription
switch.{type}_climate_mode_{name}onEnables climate mode strategy; otherwise, defaults to the standard strategy.
switch.{type}_outside_temperature_{name}onSwitches between inside and outside temperatures as the basis for determining the climate control strategy.

entities

Features Planned

Simulation

combined_simulation

Blueprint (deprecated since v1.0.0)

This integration provides the option to download a blueprint to control the covers automatically by the provide sensor. By selecting the option the blueprints will be added to your local blueprints folder.