From 5b79c1a56a9c757089cef6cf186817ae46bf76ea Mon Sep 17 00:00:00 2001 From: Kasper Date: Thu, 20 Aug 2026 16:56:57 +0200 Subject: [PATCH] Update Outdoor Light --- Outdoor-Light.md | 330 +++++++++++++++++++++++++++++++---------------- 1 file changed, 216 insertions(+), 114 deletions(-) diff --git a/Outdoor-Light.md b/Outdoor-Light.md index d56c4c4..41c24b0 100644 --- a/Outdoor-Light.md +++ b/Outdoor-Light.md @@ -11,163 +11,143 @@ The blueprint is designed for outdoor lighting that should: - Optionally turn on again in the early morning - 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 -- Turn lights on automatically when it gets dark -- Turn lights off when daylight returns -- Configurable night-time shutdown -- Optional morning reactivation -- Uses **Sun elevation** instead of fixed sunset/sunrise times -- Optional enable/disable entity -- Supports one or multiple lights -- Fully configurable through the Home Assistant Blueprint UI - ---- +- 🌅 Turns lights on automatically when it gets dark +- 🌄 Turns lights off when daylight returns +- 🌙 Configurable night-time shutdown +- 🌅 Optional morning reactivation +- ☀️ Uses sun elevation instead of fixed sunset/sunrise times +- 🔘 Optional enable/disable entity +- 💡 Supports one or multiple lights +- ⚙️ Fully configurable through the Home Assistant Blueprint UI ## How it Works The automation has four independent triggers: -``` - Sun elevation - │ - ▼ - Below evening level - │ - ▼ - LIGHT ON - │ - │ + Sun elevation falls below evening elevation + │ + ▼ + LIGHT ON + │ + │ Night Off Time - │ - ▼ - LIGHT OFF - │ - │ + │ + ▼ + LIGHT OFF + │ + │ Morning On Time - │ - ▼ - Still dark enough? - │ │ - YES NO - │ │ - ▼ ▼ - LIGHT ON No action - │ - │ - Sun elevation - above morning level - │ - ▼ - LIGHT OFF -``` ---- -### Evening + │ + ▼ + Still dark? + │ │ + YES NO + │ │ + ▼ ▼ + LIGHT ON No action + │ + │ + Sun elevation rises + above morning elevation + │ + ▼ + LIGHT OFF -When the sun's elevation falls below the configured Evening elevation, the selected lights are turned on. +## Evening -**Example:** -``` -If: -Evening elevation: -4° -``` +When the sun's elevation falls below the configured **Evening elevation**, the selected lights are turned on. -the lights will turn on when the sun drops below -4° elevation. +### Example -This allows the lighting to follow the actual daylight conditions throughout the year rather than relying on a fixed time. + Evening elevation: -4° ---- -### Night Off +The lights will turn on when the sun drops below `-4°` elevation. + +Using sun elevation means the automation automatically follows the changing daylight throughout the year instead of relying on a fixed time. + +## Night Off The lights can optionally be switched off at a fixed time during the night. -**Example:** -``` -Night Off: Enabled -Night Off Time: 23:00 -``` +Example: -At 23:00 the lights will be turned off. + Night Off: Enabled + Night Off Time: 23:00 + +At 23:00 the lights are switched off. 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. -**Example:** -``` -Morning On: Enabled -Morning On Time: 05:30 -``` +Example: + + Morning On: Enabled + Morning On Time: 05:30 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** -``` -Morning On Time: 05:30 -Morning elevation: -4° -``` +### Example + + Morning On Time: 05:30 + Morning elevation: -4° At 05:30: -``` -Sun elevation < -4° - │ - ├── YES → Lights ON - │ - └── NO → No action -``` + Sun elevation < -4° + │ + ├── YES → Lights ON + │ + └── 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. -**Example:** -``` -Morning elevation: -4° -``` +For example: -Once the sun reaches an elevation above -4°, the lights are switched off. + Morning elevation: -4° + +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. ---- ## Enable Entity An optional entity can be selected to enable or disable the automation. For example: -``` -input_boolean.outdoor_lights_enabled -``` + + input_boolean.outdoor_lights_enabled + When the entity is: -``` -ON -``` + + ON + the automation is allowed to control the lights. When the entity is: -``` -OFF -``` + + OFF + the automation will not perform any actions. If no enable entity is selected, the automation is always enabled. ---- ## Blueprint Inputs + | Input | Description | Default | -| --- | --- | --- | +|---|---|---| | Light(s) | Light entities controlled by the automation | — | | Enable Entity | Optional entity used to enable/disable automation | None | | Evening elevation | Sun elevation at which lights turn on | -4° | @@ -177,28 +157,150 @@ If no enable entity is selected, the automation is always enabled. | Enable Morning On | Enable morning reactivation | Yes | | 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 - Home Assistant -- sun.sun integration -- One or more light entities +- `sun.sun` integration +- 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 1. Download the Blueprint YAML file. -2. Open Home Assistant. +2. Open **Home Assistant**. 3. Go to: -``` -Settings -→ Automations & Scenes -→ Blueprints -``` + Settings → Automations & Scenes → Blueprints 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. + +## 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 \ No newline at end of file