Update Outdoor Light
252
Outdoor-Light.md
252
Outdoor-Light.md
@@ -11,32 +11,24 @@ The blueprint is designed for outdoor lighting that should:
|
|||||||
- Optionally turn on again in the early morning
|
- Optionally turn on again in the early morning
|
||||||
- Turn off again when daylight returns
|
- Turn off again when daylight returns
|
||||||
|
|
||||||
An optional enable entity can be used to completely enable or disable the automation.
|
An optional enable entity can be used to enable or disable the automation.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Turn lights on automatically when it gets dark
|
- 🌅 Turns lights on automatically when it gets dark
|
||||||
- Turn lights off when daylight returns
|
- 🌄 Turns lights off when daylight returns
|
||||||
- Configurable night-time shutdown
|
- 🌙 Configurable night-time shutdown
|
||||||
- Optional morning reactivation
|
- 🌅 Optional morning reactivation
|
||||||
- Uses **Sun elevation** instead of fixed sunset/sunrise times
|
- ☀️ Uses sun elevation instead of fixed sunset/sunrise times
|
||||||
- Optional enable/disable entity
|
- 🔘 Optional enable/disable entity
|
||||||
- Supports one or multiple lights
|
- 💡 Supports one or multiple lights
|
||||||
- Fully configurable through the Home Assistant Blueprint UI
|
- ⚙️ Fully configurable through the Home Assistant Blueprint UI
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## How it Works
|
## How it Works
|
||||||
|
|
||||||
The automation has four independent triggers:
|
The automation has four independent triggers:
|
||||||
|
|
||||||
```
|
Sun elevation falls below evening elevation
|
||||||
Sun elevation
|
|
||||||
│
|
|
||||||
▼
|
|
||||||
Below evening level
|
|
||||||
│
|
│
|
||||||
▼
|
▼
|
||||||
LIGHT ON
|
LIGHT ON
|
||||||
@@ -51,7 +43,7 @@ The automation has four independent triggers:
|
|||||||
Morning On Time
|
Morning On Time
|
||||||
│
|
│
|
||||||
▼
|
▼
|
||||||
Still dark enough?
|
Still dark?
|
||||||
│ │
|
│ │
|
||||||
YES NO
|
YES NO
|
||||||
│ │
|
│ │
|
||||||
@@ -59,113 +51,101 @@ The automation has four independent triggers:
|
|||||||
LIGHT ON No action
|
LIGHT ON No action
|
||||||
│
|
│
|
||||||
│
|
│
|
||||||
Sun elevation
|
Sun elevation rises
|
||||||
above morning level
|
above morning elevation
|
||||||
│
|
│
|
||||||
▼
|
▼
|
||||||
LIGHT OFF
|
LIGHT OFF
|
||||||
```
|
|
||||||
---
|
|
||||||
### Evening
|
|
||||||
|
|
||||||
When the sun's elevation falls below the configured Evening elevation, the selected lights are turned on.
|
## Evening
|
||||||
|
|
||||||
|
When the sun's elevation falls below the configured **Evening elevation**, the selected lights are turned on.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```
|
|
||||||
If:
|
|
||||||
Evening elevation: -4°
|
Evening elevation: -4°
|
||||||
```
|
|
||||||
|
|
||||||
the lights will turn on when the sun drops below -4° elevation.
|
The lights will turn on when the sun drops below `-4°` elevation.
|
||||||
|
|
||||||
This allows the lighting to follow the actual daylight conditions throughout the year rather than relying on a fixed time.
|
Using sun elevation means the automation automatically follows the changing daylight throughout the year instead of relying on a fixed time.
|
||||||
|
|
||||||
---
|
## Night Off
|
||||||
### Night Off
|
|
||||||
|
|
||||||
The lights can optionally be switched off at a fixed time during the night.
|
The lights can optionally be switched off at a fixed time during the night.
|
||||||
|
|
||||||
**Example:**
|
Example:
|
||||||
```
|
|
||||||
Night Off: Enabled
|
Night Off: Enabled
|
||||||
Night Off Time: 23:00
|
Night Off Time: 23:00
|
||||||
```
|
|
||||||
|
|
||||||
At 23:00 the lights will be turned off.
|
At 23:00 the lights are switched off.
|
||||||
|
|
||||||
This feature can be disabled if the lights should remain on throughout the entire night.
|
This feature can be disabled if the lights should remain on throughout the entire night.
|
||||||
|
|
||||||
---
|
## Morning On
|
||||||
### Morning On
|
|
||||||
|
|
||||||
The blueprint can optionally turn the lights back on in the morning.
|
The blueprint can optionally turn the lights back on in the morning.
|
||||||
|
|
||||||
**Example:**
|
Example:
|
||||||
```
|
|
||||||
Morning On: Enabled
|
Morning On: Enabled
|
||||||
Morning On Time: 05:30
|
Morning On Time: 05:30
|
||||||
```
|
|
||||||
|
|
||||||
At 05:30 the automation checks the sun's elevation.
|
At 05:30 the automation checks the sun's elevation.
|
||||||
|
|
||||||
The lights will only turn on if the sun is still below the configured Morning elevation.
|
The lights will only turn on if the sun is still below the configured **Morning elevation**.
|
||||||
|
|
||||||
This prevents the lights from being turned on unnecessarily during periods when it is already daylight.
|
This prevents the lights from being switched on when daylight has already arrived.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
**Example**
|
|
||||||
```
|
|
||||||
Morning On Time: 05:30
|
Morning On Time: 05:30
|
||||||
Morning elevation: -4°
|
Morning elevation: -4°
|
||||||
```
|
|
||||||
|
|
||||||
At 05:30:
|
At 05:30:
|
||||||
|
|
||||||
```
|
|
||||||
Sun elevation < -4°
|
Sun elevation < -4°
|
||||||
│
|
│
|
||||||
├── YES → Lights ON
|
├── YES → Lights ON
|
||||||
│
|
│
|
||||||
└── NO → No action
|
└── NO → No action
|
||||||
```
|
|
||||||
|
|
||||||
### Morning Off
|
## Morning Off
|
||||||
|
|
||||||
When the sun rises above the configured Morning elevation, the lights are turned off.
|
When the sun rises above the configured **Morning elevation**, the lights are turned off.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```
|
|
||||||
Morning elevation: -4°
|
Morning elevation: -4°
|
||||||
```
|
|
||||||
|
|
||||||
Once the sun reaches an elevation above -4°, the lights are switched off.
|
Once the sun reaches an elevation above `-4°`, the lights are switched off.
|
||||||
|
|
||||||
This provides the final daylight shutdown after the optional morning lighting period.
|
This provides the final daylight shutdown after the optional morning lighting period.
|
||||||
|
|
||||||
---
|
|
||||||
## Enable Entity
|
## Enable Entity
|
||||||
|
|
||||||
An optional entity can be selected to enable or disable the automation.
|
An optional entity can be selected to enable or disable the automation.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
```
|
|
||||||
input_boolean.outdoor_lights_enabled
|
input_boolean.outdoor_lights_enabled
|
||||||
```
|
|
||||||
When the entity is:
|
When the entity is:
|
||||||
```
|
|
||||||
ON
|
ON
|
||||||
```
|
|
||||||
the automation is allowed to control the lights.
|
the automation is allowed to control the lights.
|
||||||
|
|
||||||
When the entity is:
|
When the entity is:
|
||||||
```
|
|
||||||
OFF
|
OFF
|
||||||
```
|
|
||||||
the automation will not perform any actions.
|
the automation will not perform any actions.
|
||||||
|
|
||||||
If no enable entity is selected, the automation is always enabled.
|
If no enable entity is selected, the automation is always enabled.
|
||||||
|
|
||||||
---
|
|
||||||
## Blueprint Inputs
|
## Blueprint Inputs
|
||||||
|
|
||||||
| Input | Description | Default |
|
| Input | Description | Default |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| Light(s) | Light entities controlled by the automation | — |
|
| Light(s) | Light entities controlled by the automation | — |
|
||||||
@@ -177,28 +157,150 @@ If no enable entity is selected, the automation is always enabled.
|
|||||||
| Enable Morning On | Enable morning reactivation | Yes |
|
| Enable Morning On | Enable morning reactivation | Yes |
|
||||||
| Morning On Time | Time when morning lighting is evaluated | 05:30 |
|
| Morning On Time | Time when morning lighting is evaluated | 05:30 |
|
||||||
|
|
||||||
---
|
## Recommended Settings
|
||||||
|
|
||||||
|
A typical configuration for outdoor lighting could be:
|
||||||
|
|
||||||
|
Evening elevation: -4°
|
||||||
|
Morning elevation: -4°
|
||||||
|
|
||||||
|
Night Off: Enabled
|
||||||
|
Night Off Time: 23:00
|
||||||
|
|
||||||
|
Morning On: Enabled
|
||||||
|
Morning On Time: 05:30
|
||||||
|
|
||||||
|
This results in:
|
||||||
|
|
||||||
|
Dusk
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Lights ON
|
||||||
|
│
|
||||||
|
│
|
||||||
|
23:00
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Lights OFF
|
||||||
|
│
|
||||||
|
│
|
||||||
|
05:30
|
||||||
|
│
|
||||||
|
├── Still dark → Lights ON
|
||||||
|
│
|
||||||
|
└── Already light → No action
|
||||||
|
│
|
||||||
|
│
|
||||||
|
Sun > -4°
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Lights OFF
|
||||||
|
|
||||||
|
## Example: Typical Day
|
||||||
|
|
||||||
|
Assuming:
|
||||||
|
|
||||||
|
Evening elevation: -4°
|
||||||
|
Night Off Time: 23:00
|
||||||
|
Morning On Time: 05:30
|
||||||
|
Morning elevation: -4°
|
||||||
|
|
||||||
|
The automation could behave like this:
|
||||||
|
|
||||||
|
| Time | Sun elevation | Action |
|
||||||
|
|---|---|---|
|
||||||
|
| 18:00 | Above -4° | No action |
|
||||||
|
| 20:00 | Below -4° | 💡 Lights ON |
|
||||||
|
| 23:00 | Below -4° | 🌙 Lights OFF |
|
||||||
|
| 05:30 | Below -4° | 🌅 Lights ON |
|
||||||
|
| 06:30 | Above -4° | ☀️ Lights OFF |
|
||||||
|
|
||||||
|
The exact times will naturally change throughout the year because the evening and morning transitions are based on sun elevation.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Home Assistant
|
- Home Assistant
|
||||||
- sun.sun integration
|
- `sun.sun` integration
|
||||||
- One or more light entities
|
- One or more `light` entities
|
||||||
|
|
||||||
The optional Enable Entity can be any Home Assistant entity that provides an on/off state.
|
The optional Enable Entity can be any Home Assistant entity that provides an `on`/`off` state.
|
||||||
|
|
||||||
---
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Download the Blueprint YAML file.
|
1. Download the Blueprint YAML file.
|
||||||
2. Open Home Assistant.
|
2. Open **Home Assistant**.
|
||||||
3. Go to:
|
3. Go to:
|
||||||
|
|
||||||
```
|
Settings → Automations & Scenes → Blueprints
|
||||||
Settings
|
|
||||||
→ Automations & Scenes
|
|
||||||
→ Blueprints
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Import the Blueprint.
|
4. Import the Blueprint.
|
||||||
5. Create an automation from the Blueprint.
|
5. Create a new automation from the Blueprint.
|
||||||
6. Select the lights and configure the desired settings.
|
6. Select the lights and configure the desired settings.
|
||||||
|
|
||||||
|
## Configuration Example
|
||||||
|
|
||||||
|
A simple configuration could be:
|
||||||
|
|
||||||
|
Lights:
|
||||||
|
Outdoor lights
|
||||||
|
|
||||||
|
Evening elevation:
|
||||||
|
-4°
|
||||||
|
|
||||||
|
Morning elevation:
|
||||||
|
-4°
|
||||||
|
|
||||||
|
Night Off:
|
||||||
|
Enabled
|
||||||
|
|
||||||
|
Night Off Time:
|
||||||
|
23:00
|
||||||
|
|
||||||
|
Morning On:
|
||||||
|
Enabled
|
||||||
|
|
||||||
|
Morning On Time:
|
||||||
|
05:30
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
### Sun Elevation
|
||||||
|
|
||||||
|
Sun elevation is measured in degrees relative to the horizon.
|
||||||
|
|
||||||
|
Positive elevation
|
||||||
|
│
|
||||||
|
│ ☀️ Sun
|
||||||
|
│
|
||||||
|
───────┼──────────── Horizon (0°)
|
||||||
|
│
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
Negative elevation
|
||||||
|
|
||||||
|
Using a negative elevation such as `-4°` means that the sun is already below the horizon.
|
||||||
|
|
||||||
|
This makes the automation independent of fixed clock times and automatically adapts throughout the year.
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
The blueprint currently does not:
|
||||||
|
|
||||||
|
- Change brightness depending on time of day
|
||||||
|
- Use transitions when turning lights on/off
|
||||||
|
- Detect manual changes to the lights
|
||||||
|
- Restore the previous light state
|
||||||
|
- Use weather or cloud conditions
|
||||||
|
- Use different lights for evening and morning
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
### v1.0
|
||||||
|
|
||||||
|
- Initial release
|
||||||
|
- Evening activation using sun elevation
|
||||||
|
- Configurable night shutdown
|
||||||
|
- Optional morning activation
|
||||||
|
- Morning shutdown based on sun elevation
|
||||||
|
- Optional enable entity
|
||||||
|
- Support for multiple lights
|
||||||
Reference in New Issue
Block a user