Then I also found this blueprint which looks amazing and also offers similar functions like color temp and brightness based on time of day and lux and also a night mode.
Before I start doing test use cases and spend lots of time I was wondering if anyone has done that already and knows both? What do you prefer? Where are major differences?
I have a question to the bypass. You write that I should add the switch entity and depending on the setting my lights will go on, off or keep their state.
I use primarily Friends of Hue EnOcean switches (Friends of Hue Smart Switch - EnOcean) that are connected to HA via Zigbee2MQTT (same as the lights). These have 4 ābuttonsā with multiple actions each (e.g. press, hold etc.). Currently they are setup (via automations) that one button turns lights on, one turns off, and other 2 call scenses.
In the blueprint I can select the switch e.g. under bypass switch - turn lights ON but how will be determined which action was triggered / which button was pressed? Or will simply any press on the switch turn the lights on? That would kinda defeat the purpose of the way the switches are setup.
Or do I understand this function completely wrong?
Iāll set the time to 60 as you suggest and work from there, Iāll let you know how I get on.
Iāll also set the āTriggerā to end at 9pm ish and then have the āNight Lightsā start at 10pm ish and see what happens.
How about the idea of running a new instance of your āBlueprintā after the first instance has finished at say 9pm ish at 10pm ish and have it turn down the lights using your original āDim the Lightsā as the Sun drops even more over my horizon?
Iāll try it and let you know how I get on after trying your idea re the 60 setting aboveā¦
Again thanks for the helpā¦
Iām sure we/you will eventually crack it and it will help a lot more people with there home and outside lighting.
Best Regards,
Bobā¦
PS: If I wanted to try and write my own code to drive something like my lights or whatever how would I get started? Iāve done some code bashing many years back, done some assembler coding +++ some C+ coding so Iām not exactly innocentā¦
A few points:
1, My lights can dim to 1% so no problem with this setting.
2, Iāve set the lights to come on at sun set ,elevation falling, 0ā (Donāt have a degrees sign) and off at Dusk -6ā just to test.
3, Through the āSunā global option I have enabled only Sun Descending Action as I have set it to Elevation Falling between 1ā and -7ā ie: just before Sun Set and just after dusk. (Iām in the UK and we are going into late Sun Setāsā¦
4, Night Light set to transition 60 as requested down to 1ā and stay on at 1ā until turned off by the Trigger Helper (9.30pm off - 5 below)
5, Trigger Helper set to on at 3pm and off at 9.30pm - Iām hoping this will turn the Test Light OFF for the night (9.30pm OFF).
Iām trying to implement weather bypass for motion sensors in following way:
I do not possess ambient light sensor.
Iād like to be able to activate motion sensor lights if itās ācloudyā or ārainā outside.
It can be a simple helper switch automated to get ON or OFF state based on weather conditions.
In other words, Iām trying to activate lights if it is a day (and with already existing settings lights would not turn ON) but if this helper switch is ON, it would bypass normal behavior and activate lights when motion is detected.
The blueprint requires an entity that has a ON / OFF state. You may need to have your buttons toggle a toggle helper and then add the helpers to the blueprint. Not sure what you are doing in regards to your trigger and if you are wanting a button to be used as the trigger to run dynamic lighting or just the automation. You can do this by inserting your button entity ID into the YAML. To do this, just use any entity as the trigger then edit in YAML and swap over the entities IDās.
If you had the buttons toggle a toggle helper and use those toggle helpers in the automation then you could have one button as the trigger, one button as the bypass and the other 2 you can keep what you have to call scenes but I am not sure what you are exactly trying to doing.
These settings are for dynamic lighting to follow and because you have 1% in the āMin Brightness Valueā is not for when the light comes ON. It is the linear line for dynamic lighting. Example. If you donāt use the sun global condition and just your schedule the light would turn ON at 3pm at 1% and when it get below 0Ā° the light will start to transition to 100% linear between 0Ā° to -6Ā°. When it gets to -6Ā° it will be 100%. This is all good the way you set it up just trying to explain the settings. See point 3 for when it comes ON.
All good. The main setting we are looking at for your set up is āSun Elevation Fallingā @ 1Ā°. Because the schedule is 3pm well before 1Ā° the automation will wait for sun elevation to turn the light ON. When it gets to 1Ā° and below the light will turn ON @ +1% as per your āDynamic Lighting - Min Brightness Valueā. This is what turns your light ON not point 2. Example, say your āSun Elevation Fallingā was set @ 5Ā°, between 5Ā° to 0Ā° your lights would be at 1%. Then the light will start to transition to 100% linear between 0Ā° to -6Ā° as per you dynamic lighting settings. I use āSun Elevation Fallingā @ 5Ā° in this example because your settings are 1Ā° to 0Ā° and this will happen quickly and you may not notice anything. All your settings are okay with what you have just trying to explain to hopefully make sense.
That is good. Because your trigger helper set to on at 3pm and off at 9.30pm at 9:30pm is when the light will turn OFF. Because your āNight Lights - End Timeā is also set to 9:30pm is should work without transition back to normal lights. If you would like to be safe then you could set your āNight Lights - End Timeā to say 10pm. This setting of 10pm is not when the light will turn OFF as your trigger helper set at 9.30pm, it is for when night lights will be applied. I am just trying to avoid a flash of 100% brightness in the transition to OFF. Try setting your āNight Lights - End Timeā to 10pm if you are getting a flash of 100%.
Yes this will happen. It will start to transition OFF at 9:30pm and because you have 0 time delay with 2 sec transition delay it should be OFF at 9:30:02pm.
Okay, so you would like a condition that the motion sensor will only work if it is ācloudyā or ārainā outside.
What you can do is create a binary template sensor so when motion is detected and the helper switch is ON the binary template sensor is ON. Then use this binary sensor in your trigger not the motion sensor.
But not sure if you would like it to work at night when it is dark. If so in your helper switch for the weather you will need to make it so if it is day time and it is cloudy or raining then ON else ON. Make sure you put a day condition in it so the else ON will be ON at night. You could also just do all this in a binary template sensor also adding in your motion sensor and use this as the trigger.
Can anyone enlighten me on how I can add the motion detection time?
Iām using a Hue Philips motion sensor, which, in normal automation, allows the detection time to be added (e.g.: on same places, I would prefer to only activate lights if movement is detected for 5 seconds).
Some motion sensor can have this option in there settings. If not, to make it work you can create a template binary sensor using your motion sensor and put a delay in of 5 sec. I have template examples in the FAQ but here is the link to them, click here
The example you would use it REF - TS-2. Once you create this template binary sensor you would use it as your trigger and not your actual motion sensor.
Thanks for the proposed solution. Although I know how to do it as a separate automation, I wanted to implement this feature as an addition to your marvelous blueprint.
It has all of the other features needed, but Iām missing this one.
So either to add additional condition that will override currently inactive lights during the day via switch or by checking string value of a provided helper.
This is what Iām trying to do. Form of a blueprint feature request
And yes, you got it right. During the night it shouldnāt change behaviour.
Hey again! That was a bit long but now i 100% know what this issue is caused by zigbee2mqtt new version which got updated few days before 2024.4 release. Zigbee2mqtt 1.36.1 have this issue with my Sonoff zigbee stick. And issue disappearing after i restore 1.35.3
Okay, looking at your example above (the image) and your postā¦ looks like bypass 2 is what you are looking for. This will disable the automation based on your helper and turn the lights OFF. The bypass is quite powerful in what it can do, it digs deep analyzing what it happening when the bypass turns OFF.
I understand you know how to do this but for the others reading I will provide an example.
If we create a template sensor helper that has some conditions that are, it must be day time + cloudy or raining and if not turn the helper ON else turn it OFF. In the code below I have added unavailable and partlycloudy in the example but you can remove them. Then when bypass is ON the lights will turn OFF if the conditions are met + the automation will be disabled. When the bypass turns OFF as the conditions are not met it will check the site conditions and preform the correct action. I have not tested this code just typed it out but it should work. We would enter this code into the āState templateā of the template sensor helper.
EDIT I have updated the code.
{% set weather_state = states('weather.forecast_home') %}
{% if is_state('sun.sun', 'above_horizon') and weather_state not in ['partlycloudy', 'cloudy', 'rainy', 'unavailable'] %}
on
{% else %}
off
{% endif %}
Hi. I am having issues when using this automation with IKEA Styrbar remote control for manual override. I connected this switch though ZHA but it does not create binary output. Instead, this switch generates zha_event with unique cluster_id and end_point_id.
Below is an automation written by Malte to control lights using this remote switch. ZHA - IKEA four button remote (Styrbar) for lights (E2001, E2002) - Blueprints Exchange - Home Assistant Community (home-assistant.io)
Are there any possible way to use this switch for manual override control? Your input is much appreciated. Thank you.
What I would do is have the switch (IKEA Styrbar remote) toggle a āToggle Helperā ON and OFF when you press the switch. I would then use the āToggle Helperā in the bypass as they have an ON / OFF state.
To create a toggle helper go to settings > devices and services > click on helpers tab at the top > click create helper and select toggle.
Iām new to HA and a friend of mine helped me get started with your blueprint. Itās really awesome. However there is one thing I could not figure out:
We have some color Hue lights and is there a way to set the color for those with your blueprint? The only thing Iāve seen is to set the ātemperatureā.
@Blacky
Can the Night Lights - Entity State be a Motion Sensor?
Coming up the stairs, a motion sensor triggers the light in the hall (this is a Sensor Light BP) that leads to the bed and bathroom. The bathroom has a motion sensor too.
Using the Night option of the bathroom Sensor Light BP, I want the bathroom light to switch on when motion is detected by the hall (landing?) motion sensor, but only during the Night Time hours setting.
I tried to use the hall motion sensor as a Night Lights - Entity State for the bathroom but this does not work. Any suggestion how to get it working?
Hi Blacky. Can you just point me in the right direction. Have motion sensor dimmable smart bulbs, I use night light feature for quieter light after 9pm and the bypass when a day/night helper binary toggle switches to night.
Soā¦question is, I just bought a lux sensor from these Screek, love their esp32 5v radar sensors for motion. This one for lux is new, just released:
Anyway, Iām already using the bypass for the day/night toggle. How would I also bypass the light turning on if the lux level is below a certain level?