Well it made me do the update anyway ⌠I have the new blueprint ready and will update now. Just doing final checks.
Changed what happens when the by-pass is turned OFF. It will now re-evaluate the trigger sensor.
When the by-pass is turned OFF and trigger sensor is ON.
- If the lights are OFF, turn lights ON and run automation.
- If the lights are ON, leave lights ON and run automation.
When the by-pass is turned OFF and trigger sensor is OFF.
- If the lights are ON, turn lights OFF and wait for the trigger sensor.
- If the lights are OFF, leave lights OFF and wait for the trigger sensor.
Enjoy
Blacky
Absolutely love every version! Very practical and reliable automation!
I would like to suggest addition of transition time!
Use case: For a smoother transition for night lights, giving the room a calmer ambience with a slower transition, easier on the eyes too!
Hi @samuelthng
Thanks for your suggestion . I have this on my list to do and would like to have this option included to. I will look into it again.
Edit: For future comers. I disabled the âsave stateâ option from the integrations page (choose light > configure) and the error is no longer showing. Blueprint is working fine!
Original post: I have the original aqara motion sensor, and Iâve setup a simple Turn ON lights for 1 minute when motion is detection. It looks like the sensor does activate the Lights ON scene, but it fails to activate the Lights OFF scene for some reason. I checked the Trace timeline and found an error. Iâm not sure if itâs related but Iâve attached it for reference. Thanks!
Fixed a bug when selected âEnable the By-pass - If lights are ON, turn lights OFFâ. If trigger sensor was ON and stayed ON the light would not turn OFF.
Added the "By-pass Time Delayâ option.
Use case.
- You turn the by-pass on and you have âEnable the By-pass - If lights are ON, turn lights OFFâ selected. You then need some time to exit before the lights turn off.
- When you turn your by-pass off and at the same time your trigger sensor is off but your still in the room and need to keep the lights on while the motion sensor will trigger again soon (within the set by-pass time delay) and take over the automation. This will stop you flapping your arms around to trigger the sensor again so you lights will turn back on.
TIP: You can now also link this blueprint with my Bathroom Humidity Exhaust Fan blueprint. So if you use this blueprint to control the lights in your bathroom sometimes when having a shower the motion sensor doesnât work when you behind the shower screen turning your lights off. If you put the bathroom exhaust fan used in my Bathroom Humidity Exhaust Fan blueprint into the by-pass of this automation the lights will stay on while you are in the shower. When the fan turns off it reset this automation and the light will stay on or go off depending on the trigger sensor.
Enjoy
Blacky
Hey Blacky,
Thank you very much for your new update. I havenât been in the HA world and your Blueprint for very long, but I am really very happy.
Maybe you or the community can help me with a thought that I canât quite get through my head. As already mentioned, I am using your Blueprint, which works just fine. But now I also like to use Siri and tell it to set the light to 100% in the kitchen, for example, because Iâm cooking and need more light than usual (65%) via the motion sensor. But now it is the case that the set brightness is reset to 65% by the motion sensor. I have no idea how I could implement this.
Can anyone follow me and is there perhaps already an idea for this?
Thank you very much
Seger
Hi @Seger85
Your welcome, glad you like it.
Now with the new update V2.8 and the new by-pass options it will work with the voice (Siri). We need to think of the voice as if we were to do it manually but we are just using our voice.
So what we will need to do is set up the by-pass so you can have manual control of your lights. In the FAQ it will walk you through the steps on âHow to use the âTrigger Sensor By-passâ without having a physical switchâ. In the FAQ we used âSensor Light By-passâ as the name but you will need to think of a name that suits you better, maybe âKitchen Lights By-passâ. Then you will need to enable the by-pass and select âEnable the By-pass - If lights are ON, leave lights ONâ. Also maybe have the âBy-pass Time Delayâ set to the minutes that suits you.
So now when you ask Siri set the light to 100% in the kitchen you would say something like this.
âhey Siri, could you turn on the kitchen light by-pass and set the kitchen lights to 100%â.
or you could try this
âhey Siri, could you turn on the kitchen light by-pass for 1 hour and set the kitchen lights to 100%â.
If the 1 hour doesnât work with Siri then you could try my Entity - Run ON Timer blueprint. Or you could just remember to ask Siri to turn off the kitchen light by-pass when you are done.
Hope this works, let us know how you go.
Disclaimer I donât use voice commands yet.
Blacky
Hey @Blacky,
Thanks again! I figured it was something to do with the bypass option. I will definitely have a look at it. In your description you mentioned separate bypass names, which I donât think is quite optimal in the wake of the language glitch. I fiddled around a bit last night and something has come up, but thereâs still one point where Iâm stuck. If necessary, you can also integrate the thoughts into the Blueprint. So what have I done and what is the initial situation?
I currently have 3 different Blueprints (hallway, kitchen & bedroom âliving room to come laterâ). Each room has max. 65% light intensity set via your Blueprint.
Attached is an example for viewing (this makes it easier):
alias: licht_kuche_automation
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.bewegungsmelder_kuche_1_0_occupancy
time_delay: 6.5
include_light_control: use_brightness
light_brightness: 65
include_bypass: bypass_disabled
include_time: time_disabled
after_time: "00:00:00"
before_time: "00:00:00"
include_night_lights: night_lights_enabled
night_time_delay: 1.5
include_night_light_control: use_night_brightness
night_lights_after_time: "01:35:00"
night_lights_before_time: "07:00:00"
end_scenes: []
night_light_brightness: 7
night_lights:
device_id:
- 48feb7e201d1d2ee7b6158b4f277ea74
include_ambient: ambient_enabled
ambient_light_options: ambient_light_option_enabled
ambient_light_value: 60
ambient_light_sensor: sensor.bewegungsmelder_kuche_1_0_illuminance
light_switch:
device_id:
- 48feb7e201d1d2ee7b6158b4f277ea74
Then I created an additional automation per room (which is called Light 100% - which is not quite right). Attached is the automation:
alias: licht_kuche_100_prozent_automation
description: ""
trigger:
- platform: numeric_state
entity_id: light.signify_netherlands_b_v_lwb010_huelight_2
attribute: brightness
above: 169.8
condition: []
action:
- service: automation.turn_off
data:
stop_actions: false
target:
entity_id: automation.licht_kuche
- service: script.xx_minuten_licht_automationen_wieder_einschalten
data: {}
mode: single
As you can see from the automation, the automation switches off your main automation/blueprint as soon as the light goes above 65% and starts a script that specifies the minutes how long the automation should be off. After the time has elapsed, your Blueprint automation is switched on again. The advantage of this procedure is that I donât have to say a separate name, I just have to set Brighter or Light to xx% percent. Furthermore, after the time has elapsed, your Blueprint is activated again and it automatically returns to the set value from your Blueprint when movement occurs.
Unfortunately, there is still a catch in my script that I canât get past. If I am no longer in the room after manually increasing the brightness, your blueprint naturally lacks movement and the light remains on. I would like to set it so that if no movement is detected after XX minutes, the light goes out. I have already reached the point where your Blueprint is reactivated after the time lapse and the standard brightness is selected, but it continues to light up.
script
alias: xx Minuten Licht Automationen wieder einschalten
sequence:
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
alias: "Delay for xx minutes <65% light "
- service: automation.turn_on
data: {}
target:
entity_id:
- automation.licht_flur_automation
- automation.licht_kuche
- automation.sz
- choose:
- conditions:
- type: is_no_motion
condition: device
device_id: b561c53667f7e18f61e01b5ff0d4e8ed
entity_id: binary_sensor.philips_sml001_motion_2
domain: binary_sensor
- condition: and
conditions:
- type: is_no_motion
condition: device
device_id: f29fd1904e863c533a1d9a69fac9e0d1
entity_id: binary_sensor.philips_sml001_motion
domain: binary_sensor
sequence:
- service: automation.trigger
data:
skip_condition: true
target:
entity_id: automation.licht_flur_automation
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
enabled: false
- service: light.turn_off
data: {}
target:
entity_id: light.flur_licht_gruppe
enabled: true
mode: single
Maybe you can do something with the thoughts and maybe you also want to help me with the completion.
Thanks and best regards
Seger
Hi @Seger85
You will find that the blueprint will do what you are asking for if I am understanding you correctly by just using the by-pass. I personally wouldnât enable or disable an automation to make it do what I would like.
If you donât want to say
âhey Siri, could you turn on the kitchen light by-pass and set the kitchen lights to 100%â.
and just say
âhey Siri, kitchen lights to 100%â.
and then HA will run a set of actions, then I would look more into this. Fast forward to the 22:00 minute mark. It is mind blowing
The HA team are at the next level and they are doing a fantastic job with the voice.
Hope this helps you
Blacky
I believe that the bypass achieves almost exactly what I want, only I am missing, I think, a crucial point, and that is a time-defined period where the bypass is activated. I donât want to say anything, but I want it to go back to normal mode automatically, so that the light also switches off at some point without saying anything. Your suggestions are worth their weight in gold though, look at it again, does a timed sequence make sense from your point of view and can integrate it if necessary without me having to mention it separately (globally per Blueprint, so to speak).
Many thanks
Seger
You could try my Entity - Run ON Timer blueprint. It will turn off the by-pass in a set time period and the automation will work how you would like it to work.
Thank you very much for the great tips and the time to explain things to me. I will dedicate myself to this topic again. Maybe one other thing gferagt, before I devote myself to the other topics. I have noticed some warnings in the log, do I see it correctly that they are only warnings / information and not an actual error, because some optional things were not selected, or is it possibly an incorrect setting on my part?
To investigate, please show me the log and the automation that triggers the warning:
Logger: homeassistant.components.automation
Source: components/automation/__init__.py:517
Integration: Automatisierung (documentation, issues)
First occurred: 09:49:07 (27 occurrences)
Last logged: 11:55:26
Error evaluating condition in 'licht_kuche_automation': In 'condition' (item 4 of 6): In 'or' (item 4 of 5): In 'template' condition: UndefinedError: 'dict object' has no attribute 'entity_id' In 'or' (item 5 of 5): In 'template' condition: UndefinedError: 'dict object' has no attribute 'entity_id'
alias: licht_kuche_automation
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.bewegungsmelder_kuche_1_0_occupancy
time_delay: 6.5
include_light_control: use_brightness
light_brightness: 65
include_bypass: bypass_disabled
include_time: time_disabled
after_time: "00:00:00"
before_time: "00:00:00"
include_night_lights: night_lights_enabled
night_time_delay: 1.5
include_night_light_control: use_night_brightness
night_lights_after_time: "01:35:00"
night_lights_before_time: "07:00:00"
end_scenes: []
night_light_brightness: 7
night_lights:
device_id:
- 48feb7e201d1d2ee7b6158b4f277ea74
include_ambient: ambient_enabled
ambient_light_options: ambient_light_option_enabled
ambient_light_value: 60
ambient_light_sensor: sensor.bewegungsmelder_kuche_1_0_illuminance
light_switch:
device_id:
- 48feb7e201d1d2ee7b6158b4f277ea74
I would be happy if you could give me a short hint about this.
Thank you
Seger
Your welcome, I have also added your request above to a list of possible future additions.
It could be that you had something wrong in the past. Clear the log and if you restart and there is no error then you should be all good. If you have a error then try delete the automation, not the blueprint and add it back in.
Blacky
not sure if you meant me with your lastân message. I updated the blueprint and copied the yaml code and created a new automation. Same error. I also see that it is probably related to the Philips Lux Sensor.
@Seger85 I just tested V2.8 here and it works.
Check your entity to see if it has a âentity_idâ
settings / devices & services / entities
You can also check if that entity is reporting a lux value by adding it to a dashboard.
Edit:
it is looking at your
light_switch:
device_id:
- 48feb7e201d1d2ee7b6158b4f277ea74
and looking for a ON state.
what is
- 48feb7e201d1d2ee7b6158b4f277ea74
Is it a light, or a scene?
If it is a scene see our FAQ
Q: I have set the âAmbient Light Sensor - Site Conditionsâ to âYESâ and the lights keep turning OFF. I have only selected scenes in the âLights - Switches - Scenesâ. Am I doing something wrong?
A Please follow these steps Click Here
Hey
Perhaps first of all, the Blueprint works as it should and I do not detect any errors, only this note in the log. I only use sensors in the Blueprint and no scenes. The specified device is a motion sensor from Phillips, which also provides a lux value under the Entities tab, as can be seen in the picture, currently a value of 6 lux. The entity ID is: sensor.bewegungsmelder_kuche_1_0_illuminance canât find the number anywhere, except in the Blueprintâs Yaml.
Does this help, or am I on the wrong track?
Thanks
Edit: I think I got it, your question about the number was exactly right, it was the light and not the motion sensor which also sends Lux and was correctly present in the Blueprint.
Namely I added the one sensor obviously as a device and then the number is taken and not the entity name, when I clicked on the <> sign it is also made an entity in the blueprint and the number is changed by the entity ID in the blueprint (yaml).
Anbei ein wenig bildlich:
Ich glaube das war es ⌠Thank you!!!
New to Home Assistant, coming from almost 20 years with ISY (Universal Devices)
This blueprint is amazing, the manyprograms I have in place to do a fraction of what your does, is why
Iâm looking to move over to HA.
Please forgive my ignorance, but Iâm not understanding the elevation and sun. Do you have to have to sun option on to use the elevation? Is the sun elevation a logic gate that has to be true for the automation to work? I might be trying to fit a square peg into a round hole on this, because after years of working with ISY their solution to automation is state logic.
I think this is a simple solution
I have led strips in the bathroom, and during the day the motion should trigger 100% brightness on for 30 seconds unless there is motion, then stay on, and after sunset, motion should trigger 17% brightness on for 10 seconds unless there is motion. (I see the nighttime lights option, but itâs elevation of the sun dependent not time of day.)
I was thinking I might need to have one blueprint for the daytime, and one for the nighttime but Iâm not sure how to have that based on elevation using the blueprint.
Thank you for your time that you have spent on this blueprint.
-Todd
Hi Todd, firstly welcome to the community
Thank you for your kind words.
Yes the sun elevation is global. If you use the sun it will be for normal lights and night lights. If the sun is not below your elevation setting the automation will not run. More information on sun can be found in our FAQ.
Currently the blueprint will not work this way⌠but I do really like your idea and suggestion. I will be adding this to the future options to come. Yes the elevation is global
Currently you could just use one automation but it would be time based for night lights time and not sun. You donât need to use the sun as it is an option. You will just have to pick a time of the day that it will change from 100% to 17% and set the night time to do this, but keep an eye out as your suggestion may be added. I know it really doesnât help you currently, sorry.
Blacky