Yeah, it can be confusing as there are so many options⦠I am here to help if you need it. I think you will be all good now.
Enjoy
Blacky ![]()
Yeah, it can be confusing as there are so many options⦠I am here to help if you need it. I think you will be all good now.
Enjoy
Blacky ![]()
Iāve checked Your code end iāve tried this before, but itās not the plan of automation. I understood the function which You implemented, but for my purposes is not works as i want., because depend on state of ādoorsā lights bypass steering the action. But I just look for a function to do not allow to turn off light if at the end of automation door state is OFF/ON. Sure , i can create two separate automations, for Turn ON and OFF with enabled correct bypass.
I thought that when I read your YAML but I didnāt ask because we all do it in our own way.
Maybe you can explain what you are trying to do again because from your last explanation this would work.
This statement āIf the door sensor is OFF (Closed) or ON (Open)ā. You canāt have both.
Questions:
binary_sensor.motion_sensor_hall_occupancy would indicate it is in the hall way.Maybe try to give a scenario of what you would like to happen. Example: Walk into bathroom light turns ON, close the door and have a shower behind a shower screen where the motion sensor canāt detect me. Because of this the light turns OFF. I am trying to find a way using my door sensor to keep the light ON.
Blacky ![]()
Walk into bathroom , lights ON for a 1 minute but if i have plan to stay longer for a shower the light are not turning off . Shower doors have a contact sensor .
Amazing automatization, thanks!!!.
Is there any easy way to use a timer as bypass entity?. I have tried to do it directly but it is not working. I suppose that is because the actions used in the timer doesnāt triggers the blueprint because doesnāt matches the switch/binary actions.
What I wanted to do is to use the sun elevation to enable the automation only at night (easy). The automation will be triggered by a movement detector which works perfectly (easy), but I also want to turn on the lights for a period of time when the automation time starts, ignoring the detector state.
Just now I have an automation that triggers at sunset to start the timers, then another automation turns the lights on while the timers are running and a third automation triggers at movement detection but just when the timers are not running. This is a bit tedious and that is why I want to replace it.
I have tried to fit this into your blueprint but I have seen that I can do the following:
But the way to archieve what I want seems to be using a bunch of extra automations and helpers like for example turn a binary helper when the timer is running or similar, and that is what I want to avoid because it is almost what I have right now.
Best regards.
That is a hard set up because I would assume the shower door is always closed.
Blacky ![]()
Turn on the lights at movement detection
Enable it only at night using a time schedule or the sun elevation
Turn on the light using a scheduler helper.
Override/bypass the state by using an entity (I suppose that a binary sensor or a switch)
I not sure what you are trying to do or if you are explaining you have your own automations but you should be able to do this all in one blueprint automation.
Trigger is motion, turn light ON, use the time delay in the blueprint (is this what your timer is for? If so you donāt need one, just use the time delay). Then if you would like the light to be ON between X and Y then use the bypass option 1 with a schedule helper.
The timer running thing⦠this is what is confusing me. A timer state when running is active not ON. If you need to make a timer ON / OFF then you would create a template binary sensor helper and you would use this code replacing the ID with your timer.
This is not including paused state of the timer
{{ states('timer.your_timer_here') == 'active' }}
This includes paused state
{{ states('timer.your_timer_here') in ['active', 'paused'] }}
Once you have this template binary sensor helper you can use it in the bypass. Now when your timer is active (running) the binary sensor will be ON. Then add it to the bypass option you would like to do when the timer is ON. But not sure why your using a timerā¦
Hope this helps you.
EDIT: Just a quick thought⦠are you looking at the sensor light blueprint or the smart light blueprint. You need this sensor light blueprint.
Blacky ![]()
@Blacky,
Love your blueprint. Is there a specific section that I should configure if I want the motion logic to be bypassed if a specific light is on in that room? I have multiple scenes that run based on the time of day and would like the motion to only fire and turn on the scene if a specific light is not on.
@Blacky Since couple of weeks my automation is not running properly. Lights are turning themselves off just under 2 minute doesnāt matter how much time delay I set. And other problem is they are not turning back on even there is a movement (as I am using philips hue motion sensor).
Thank you for your help.
Regards,
HSM
@Blacky here is the yaml code of my automation.
alias: Kitchen-Dining-Sensor Based Trigger
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.hue_motion_sensor_2_motion
light_switch:
entity_id:
- light.dining
- light.kitchen
time_delay: 4.5
include_light_control:
- use_brightness
- use_transition
light_transition_on: 3.5
light_transition_off: 6
include_light_colour_control: use_colour_temperature
light_colour_temperature: 4700
include_ambient: ambient_enabled
ambient_light_sensor: sensor.hue_motion_sensor_2_illuminance
ambient_light_options: ambient_light_option_enabled
ambient_light_high_value: 190
ambient_light_value: 10
include_night_lights: night_lights_enabled
night_lights_conditions:
- time_enabled
night_lights_after_time: "22:15:00"
night_lights_before_time: "06:50:00"
night_lights:
entity_id:
- light.dining
- light.kitchen
night_time_delay: 1
include_night_light_control:
- use_brightness
- use_transition
- if_lights_are_on_adjust_when_crossing_over
night_light_transition_on: 3
night_light_transition_off: 4
include_night_light_colour_control: use_colour_temperature
night_light_colour_temperature: 2800
dynamic_lighting_min_lux: 30
end_scenes: []
@Blacky I am having some issues getting the dynamic lighting to work right. Iām not sure if maybe Iām misunderstanding how it works.
What Iām trying to achieve is to have the lights in my office adjust as the day goes on. I start before the sun comes up so when I walk into the room it should be 100% brightness and as the sun comes up and brightens up the room it should gradually dim and eventually shut off and as the sun sets, itāll turn on and brighten again. The automation will work for the first few minutes and the lights will dim/brighten as I open/close my shades for testing but then stops.
alias: New automation
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.presence_sensor_fp2_cf9e_presence_sensor_1
light_switch:
entity_id: light.mike_s_office
include_dynamic_lighting: enable_lux_controled_brightness
dynamic_lighting_lux_sensor: sensor.presence_sensor_fp2_cf9e_light_sensor_light_level
dynamic_lighting_boolean: input_boolean.dynamic_lighting_helper
time_delay: 1
dynamic_lighting_heartbeat: 1
dynamic_lighting_max_lux: 150
dynamic_lighting_step_value: 10
In that case then you will need to leave the shower doors open for the automation to run in normal mode. When the doors are closed then the light will be ON.
One thing you will need to do is invert the door sensor so when it is close (OFF) it will be ON so the bypass works.
Create a template binary sensor helper and use the code below to invert it. Then use this template binary sensor in the bypass. Replace binary_sensor.your_shower_door_sensor_here with your actual shower door sensor ID.
binary_sensor.your_shower_door_sensor_here with the actual entity ID of the shower door contact sensor.{{ is_state('binary_sensor.your_shower_door_sensor_here', 'off') }}
Blacky ![]()
You can use the light in the bypass as it will have a ON / OFF state. In the pass you could just copy and paste the entity ID into the input but HA broke everything in the last release so you will have to add a entity into the bypass, then edit the automation in YAML, then replace the entity with the light you would like to use.
Blacky ![]()
Thanks for the info and you YAML below. I have had a look at it and everything looks good. The only thing that will prevent the lights from turning ON is you ambient settings. You LUX must be under 10 lx.
There are a few things you can do.
Blacky ![]()
Welcome to the community.
I just tested it here and it all seams to be working correctly.
Your min lux of 40 and your max lux of 150 and only leaves 110. This is tight. Have you thought about using Ambient option?
Blacky ![]()
@Blacky thanks! This is my first time setting up HA so Iām learning as I go.
I do have one with the Ambient option. Correct me if Iām mistaken but that only turns the light on/off based on the lux value. Iām trying to get the brightness to adjust throughout the day based on the lux value.
I had the max lux set lower for testing. Dynamic lighting doesnāt quite seem to be working right for me and Iām not sure why. It does change the brightness of my lights for a few minutes but eventually stops. I tested again this morning with max lux of 250 but it didnāt completely shut off the lights when lux hit 400 either.
Hey,
newbie here and this was probably raised a lot of times, I am just not very much into HA yet - so sorry in advance. This blueprint looks great and can probably do what I want, thanks for your work!
I setup Sensor Light and have the following issues:
Any idea how to start? Thanks!
Yes, that is correct but I was looking at you lux range and could see the point. If it was just for testing and you increase it later then yeah ok.
I tested it here again and watched it turn the light OFF and watched it turn the light back ON.
What should happen. When your presence sensor detects motion the light and the input_boolean.dynamic_lighting_helper should turn ON when the lux is below your max. As the lux increase and goes above your max the light brightness will change. Once above your max lux you light will turn OFF but your input_boolean.dynamic_lighting_helper will stay ON.
Blacky ![]()
In most homes, a wall switch and a light are not two separate entities in Home Assistant ā they are one single entity.
When you press the physical wall switch, Home Assistant sees that as the light turning ON.
If the switch and the light were separate entities, things would be easier.
For example, the automation could turn the light ON while the switch stays OFF, and you could use the switch state as a bypass to stop the automation.
But because the switch is the light, we need a different approach.
Instead of checking what is ON, we check who turned it ON.
Thatās where the
Manual Control Status Tracker blueprint comes in.
Hereās how it works:
That toggle helper is then used as a bypass:
This allows manual control to temporarily override automation, without needing separate switch and light entities.
Note:
If the light is ON because of an automation and you want to manually pause the automation, you must turn the light OFF and then back ON. This allows the system to register the action as a manual control.
If the light is turned ON by the automation and you manually change the brightness or colour then the light will stay that way until the light is turned OFF. When the automation turns the light back ON, it will apply the settings you selected in the blueprint.
Blacky ![]()