That would be great, thanks!
Also if itâs not too much to ask, maybe an option to set offset
?
eg. Turn lights on or off {duration 5/10/15min} before Sunset/Sunrise.
Thanks
That would be great, thanks!
Also if itâs not too much to ask, maybe an option to set offset
?
eg. Turn lights on or off {duration 5/10/15min} before Sunset/Sunrise.
Thanks
Hi Community, I may be off topic or trying to use the wrong blueprint for my needs and if so, please help point me in the right direction. Otherwise, I am converting from HomeSeer and one native function that took some time getting just right in tht platform, I cannot seem to duplicate in HA. We have a number of interior and exterior lighting and device automations that are tied to specific date ranges that repeat each year. For example, Interior and Exterior Christmas Automations that run either during specific times or tied to sunset and sunrise but run conditionally based on Days and Months of any year. Another Automation example would be for the period of time after Christmas to when a Valentines Automation would run. Some automations would run daily at a specific time (say 12pm on the weekends and 4pm on weekdays) or tied to sunset/sunrise (with or without and offset). My initial thought was to create separate calendars for each automation with the calendar event being one of the triggers (or a condition as it was in HomeSeer). That method is not working, likely because the multi day event never changes state. Any thoughts or suggestions on how to incorporate specific date ranges into this or another blueprint/automation? Thank you
I have updated it just doing testing before I release it.
We use sun elevation rather than time and sunset/sunrise as it works better throughout the year and HA recommend it this way. I have changed it so you have a sun elevation falling and a sun elevation for rising so they can be different.I have posted a FAQ below on this now.
Blacky
FAQ - Sun Option & Sun Elevation
Why did you use it and how can I set it?
I initially considered using Sunset and Sunrise, with a time offset but Home Assistant recommends using sun elevation for more consistent performance throughout the year. Following their advice, I opted for sun elevation. This is because the actual light level differs when using a fixed time after sunset or sunrise during winter versus summer. By setting a sun elevation, you achieve consistent light levels throughout the year.
How do I set up sun elevation settings for my lights in the blueprint?
Itâs really easy to set up. First, check your sun elevation degrees and set your Sun Elevation Falling and Sun Elevation Rising to match your specific location, as every site is different. The easiest way to do this is to add the sun solar elevation entity to your dashboard (see below). One evening, observe the sunset and note the elevation at which youâd like the lights to turn on. Set this value for Sun Elevation Falling. Repeat the process for sunrise, noting the elevation at which you want the lights to turn off, and set this for Sun Elevation Rising. Then, monitor to ensure itâs working correctly and meets your preferences. If adjustments are needed, you can easily make changes as necessary.
Note: If the slider doesnât allow you to set your desired sun elevation degrees, simply type the value into the text box and click save.
Night Lights - Sun Elevation
When choosing to use a sun elevation condition for night lights, it is not necessary to enable the sun elevation condition for normal lights. The night lights sun elevation condition will function independently.
How do I add the Sun Solar Elevation Entity and Sun Entity to a Home Assistant Dashboard?
To add the sun solar elevation and sun entity to your dashboard, follow these steps:
sensor.sun_solar_elevation
) entity. This will display the sun elevation.sun.sun
) entity. This will display whether the sun is âAbove horizonâ or âBelow horizonâ.Now you will have the sun elevation and sun status displayed on your dashboard, allowing you to evaluate and adjust the sun elevation values for your automations.
Enjoy
Blacky
Back to FAQ: Click Here
Firstly welcome to the community.
Looks like you would like a lot of different automatons. You can use this blueprint and also have another one called Sensor Light
You can also use Calendar Notifications & Actions that can do your Christmas automatons and I have a FAQ on how to set it all up that could help. You can also just use the calendar blueprint to toggle ON and OFF your automatons. So you would have a automation for x-mas lights and you toggle it ON and OFF using the start and end actions.
Hope this can help you.
Blacky
Some work is required in this upgrade see below. Only entities are allowed now, donât update if you would like to still use areas and devices or make a copy of the code to use in another custom blueprint file.
Upgrade Features
Light Control:
Sun Option: You now have the option to set a rising and falling sun elevation.
Maintenance
STEPS REQUIRED WHEN UPGRADING
Just need to clean up some YAML. Once you update and you see nothing selected in light control as shown below then jump to step 2.
If you see brightness selected as shown below then you are all good and donât need to do anything hear unless you use the sun option as a trigger then jump to step 5.
Click on the 3 dots and select edit in YAML.
We are looking for the line âinclude_light_control: dont_use_brightnessâ. If you donât see it then you are all good nothing more to do if you see it go to step 4.
Delete the line âinclude_light_control: dont_use_brightnessâ, click save then the 3 dots and select âEdit in visual editorâ. If you need to make any changes do so, if you use the sun option as a trigger then go to step 5.
Scroll down to the sun option. You will see you have 2 inputs now called âSun Elevation Fallingâ and âSun Elevation Risingâ. Adjust to your liking.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
Iâm a newb to HA and trying use this blueprint to turn on and then off a light in my office. I donât know what Iâm doing wrong. The device Iâm using is a TP-Link P135 wall plug with dimming.
alias: Office Light On & Off
description: Scheduled light on and off for workdays
use_blueprint:
path: Blackshome/entities-on-off-trigger-conditions.yaml
input:
light_colour_temperature: 2700
entity_switch:
entity_id: switch.office_light
light_transition_off: 15
light_transition_on: 0
after_time: "10:30:00"
before_time: "10:35:00"
weekday_options:
- mon
- tue
- wed
- thu
- fri
include_light_control:
- dont_use_brightness
include_time: time_enabled
include_weekdays: weekday_enabled
Welcome to the community.
Thanks for providing your YAML.
Everything looks good and I have tested this and it is working. I used version 1.8 but it should work on version 1.7. Note your âTP-Link P135 wall plugâ is a switch so the light control will not work on a switch. Maybe this is done internally within the âTP-Link P135 wall plugâ.
Not sure if you have updated to the new version 1.8 or not but if you have then you can clean up some YAML by removing the code below.
include_light_control:
- dont_use_brightness
Here is your full YAML with the code cleaned up for you.
alias: Office Light On & Off
description: Scheduled light on and off for workdays
use_blueprint:
path: Blackshome/entities-on-off-trigger-conditions.yaml
input:
light_colour_temperature: 2700
entity_switch:
entity_id: switch.office_light
light_transition_off: 15
light_transition_on: 0
after_time: "10:30:00"
before_time: "10:35:00"
weekday_options:
- mon
- tue
- wed
- thu
- fri
include_time: time_enabled
include_weekdays: weekday_enabled
Blacky
Hello Blacky,
I think I found the issue. Using Edge I created Home Assistant webpage as an app so I could pin it to my taskbar and it opens like an app. I have noticed that when updating some items it doesnât work in app mode. So I opened the HA webpage through the browser and did the update there and it worked. I also copied your version of yaml but donât think that was the problem.
Thanks for your help and the blueprint.
Thanks for the help.
Nice one and thanks for letting the community know and for getting back to me
Your welcome
Enjoy
Blacky
Thanks for the blueprint. Iâm relatively new to HA and this my first automation with HA. The following:
alias: Office Lights On
description: Turn Office Light ON at sunset and OFF at sunrise
use_blueprint:
path: Blackshome/entities-on-off-trigger-conditions.yaml
input:
entity_switch:
entity_id:
- light.office_light
- light.office_light_2
include_sun: sun_enabled
include_light_control:
- use_brightness
light_brightness: 50
include_entity_input: entity_disabled
light_transition_on: 5
light_transition_off: 5
sun_elevation_rising: -4
sun_elevation: 5
Turns the lights on appropriately before sunset but doesnât turn them off at sunrise. I added the line âsun_elevation_risingâ since the normal edit only created one line (sun_elevation) in the YAML.
These are Feit smart light bulbs connected via the Tuya integration.
Thanks for your guidance.
Hi Kent and welcome to the community.
Thanks for reaching out and giving me the heads up. There was a bug and it has now been resolved. Please update the blueprint. It will not change your automatons when you update. You can do this by just clicking on the âImport Blueprintâ blue button again at the top.
If you donât see it in your YAML it just means that you are using the default value and havenât selected anything yet so that is okay.
Again thanks for letting us know.
Blacky
Bugs Fixed
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
Trigger-Ready Control - Customize On & Off for Light, Switch, Scene, or Any Entity
Maintenance
Update the description in âLights - Switches - Entities - Scenesâ to include the new option to select âlabelsâ. The updated description should read:
NOTE: Only entities can be used. Areas, devices, and labels are not supported.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
Thanks for the quick and effective fix. I deployed the update yesterday afternoon and the lights turned off this morning as desired.
Excellent! Question, any chance to add weather to this? What I mean is, Iâd like to use Sun elevation along with weather so if itâs cloudy/raining I can change the elevation value to a different value compared to sunny/partly cloudy, etc.
Not really sure what you are trying to do. If you can give me some more detail (use case) for me to better understand.
Blacky
Apologies, I should have provided more detail. Hereâs an example for turning lights on and off at sunrise/sunset:
Letâs say for example itâs cloudy or raining, set the sunâs elevation higher before turning lights on/off and if itâs clear or partly cloudy, set the suns elevation lower.
It looks like your doing this based on the ambient light. You are best to use an ambient light sensor (LUX sensor).
Blacky
Thx for the quick response. I am using that config in one area of the house and not wanting this everywhere due to not wanting to spend money on additional sensors since the ambient light would differ extensively. There is a blueprint for âClose/open curtain (cover, blinds) based on sun and weatherâ that I can adapt⌠would be nice though to have the option⌠thanks for your hard work!