@Blacky,
I would like to thank you for writing this blueprint up, but alsoā¦ I spent 2 hours ripping out my hair cause I apparently donāt know how to read the part where it says that it only uses entities and nothing elseā¦
Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on ā</>ā and paste code in there.
Blacky
I use WLED and HA with colour temp and it works for me problem at all.
Dynamic lighting option 8 will not use RGBW it will use colour temp and brightness. Selecting this in light control will do nothing as the automation will not look at these settings. The only thing that will be active in light control will be transition.
Blacky
It would be them most FAQ I get and it is #1 FAQ. Glad you got it workingā¦ hope you like it.
Enjoy
Blacky
Iām sure the answer is in here somewhere and I just canāt find it, so I apologize in advance.
I am looking to build an automation that will turn on a set of lights when a door is unlocked or opened, and give up control (not turn them off, ignore the door being closed or locked.)
Thanks much folks, and especially @Blacky.
Welcome to the community.
Take a look at this blueprint Smart Light - Entity - Sun Elevation - Ambient & Time Triggers and use the stat ON only.
Blacky
Iām running this blueprint and canāt wait to fully understand everything, but for now, Iāll just ask this awesome community for help.
I recently made the jump to Home Assistant for more refined actions. I have a motion sensor in my master bathroom, and Iād like to set up a door sensor as a bypass switch. The goal is to turn off the motion feature so the light stays on until the door is opened again, at which point the motion detector would resume its normal functionāturning the light on when motion is detected.
The motion detection works flawlessly, but as soon as I add the bypass, nothing works. Any advice on how to fix this?
Also, I have so many other things Iād love to add, like buttons to perform additional tasks.
The best way to do this is to use my Bee In The Hive Sensor Click on the link and it will walk you through on how to set this all up Click Here. I developed it for this.
Let us know how you go.
Blacky
How do I get my hands on the bee in the hive sensor ?
You can create a template binary sensor using the code I provided ( Bee In The Hive Sensor ) with your motion and door sensors. The code goes into your configuration.yaml
file. To edit this file, youāll need the File Editor add-on, which is easy to install and supported by Home Assistant.
Installing the File Editor Add-on:
- In Home Assistant, go to Settings ā Add-ons ā Add-on store.
- Search for āFile editorā and click on it.
- Click āINSTALL.ā
Using the File Editor:
- Toggle the āShow in sidebarā option to access it easily from the main menu.
- Start the add-on.
- Refresh your browser; youāll see āFile editorā in the sidebar.
- Open the File Editor, click the folder icon in the top-left, and find the
configuration.yaml
file. - Add the code I provided there.
Modifying Entity IDs:
Before the code works, youāll need to update some entity IDs:
binary_sensor.your_door_sensor_here
: Replace with your door contact sensorās entity ID.binary_sensor.your_motion_sensor_here
: Replace with your room motion sensorās entity ID.
Reloading the Code:
After adding the code, you need to reload it for the changes to take effect:
- Go to Developer Tools ā YAML.
- Under YAML configuration reloading, click Template Entities.
This reloads the template binary sensor.
This will create a new binary sensor to be used in the automation . Read the information on Bee In The Hive Sensor for more details.
Note: Be careful when editingā¦ donāt delete anything important. If you run into issues, simply remove the added code.
Hope this helps! Let us know how you go.
Blacky
Iāve hit a bit of a roadblock at step 5. Iām able to open the config.yaml
file, but Iām running into trouble when trying to add the Bee Hive code. Hereās whatās happening:
- I can copy the Bee Hive code, but when I try to paste it into the
config.yaml
file, it wonāt let me. - When I open
config.yaml
, it auto-populates with some code. Am I supposed to delete this or paste the Bee Hive code below it?
Essentially, my question is: how do I correctly get the Bee Hive code into the config.yaml
file? Should I delete the lines that appear automatically or add the new code after them?
Any guidance would be much appreciated!
Thanks again for all the support.
Iāve created the binary sensor group called āBee in the hiveā and linked it to this blueprint, which is working flawlessly with the sensors in the group. However, Iām facing an issue with The door contact sensor its working in reverse ā when the door is closed, the sensor reads āoff,ā and when the door is open, it reads āon.ā
What I need is to flip this behavior so that the contact sensor reads āonā when the door is closed and āoffā when the door is open.
Any advice on how to fix this would be greatly appreciated!
I recently upgraded to the newer version of the sensor light, and now my automation does not work anymore. I use my Unifi doorbell camera as my binary sensor for person detection, which then turns on our front porch switch and lights. The lights are then adjusted to 100% brightness and 5000K.
Since the upgrade, this automation no longer works. I have rebuilt it several times with no luck. Any help would be greatly appreciated.
Here is my automation setup. I do not have a copy of the old version.
id: '1699286846215'
alias: Front Entry Person Detection
description: Script triggered by a camera when a person approaches the front porch
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.20102_leithcrest_way_frnt_door_person_detected
light_switch:
entity_id:
- light.wiz_rgbw_tunable_6bd442
- light.wiz_rgbw_tunable_6bbae2
- scene.front_porch_lights_on
end_scenes:
- scene.front_porch_off
include_sun: sun_disabled
time_delay: 7
dynamic_lighting_max_lux: 900
dynamic_lighting_min_lux: 0
night_time_delay: 0
after_time: '16:30:00'
before_time: '08:00:00'
light_transition_on: 0
night_light_transition_on: 0
include_light_control:
- use_colour_temperature
- use_brightness
bypass_auto_off_delay: 1
include_time: time_enabled
Here is the second automation I have created trying to perform the same task, using the same sensor and lights.
alias: Front Door Person Detection ver. 7
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.20102_leithcrest_way_frnt_door_person_detected
light_switch:
entity_id:
- light.wiz_rgbw_tunable_6bd442
- light.wiz_rgbw_tunable_6bbae2
- scene.front_porch_lights_on
end_scenes:
- scene.front_porch_off
time_delay: 7
@Blacky
Is there anyway for the āBee In The Hive Sensorā to only keep the light on once the door is closed? AKA
Motion is detected, light turns on, timer starts
Door closes, timer stops till both door opens and motion is not detected
If that is possible anywaysā¦
Try this.
template:
- trigger:
- platform: state
entity_id: binary_sensor.your_door_sensor_here
to: "off"
- platform: state
entity_id: binary_sensor.your_door_sensor_here
to: "on"
for:
seconds: 10
- platform: state
entity_id: binary_sensor.your_motion_sensor_here
to: "on"
binary_sensor:
- name: "Bee In The Hive"
device_class: occupancy
icon: mdi:account-box-outline
state: >
{{ is_state('binary_sensor.your_door_sensor_here', 'on') and is_state('binary_sensor.your_motion_sensor_here', 'on') }}
Blacky
Below is your YAML to adjust the light to 100% brightness and 5000K. Look in Light Control I have selected the options there. Copy and paste it inā¦ you may need to set your time condition up again.
alias: Front Door Person Detection ver. 7
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.20102_leithcrest_way_frnt_door_person_detected
light_switch:
entity_id:
- light.wiz_rgbw_tunable_6bd442
- light.wiz_rgbw_tunable_6bbae2
- scene.front_porch_lights_on
end_scenes:
- scene.front_porch_off
time_delay: 7
include_light_control:
- use_brightness
include_light_colour_control: use_colour_temperature
When updating to V7.0 there was some work to do. Click Here for more details.
Blacky
Hi John,
Yes this is how it works.
When the door is closed if it detects motion in the room it will turn the Bee In The Hive sensor ON. It will stay ON until the door opens. Once you create it you then group it with your motion sensor, you then add that group to the trigger not the individual sensors.
The sensor is good because you can use it for whatever you like and it is not tied to a blueprint.
Please see link for more information on it.
Blacky
@Blacky
PERFECT!! Thank you!
I am just now figuring out all of the crazy stuff you can do with your blueprintā¦ I am sure I will have more questions in the future. lol
I really love the customizability of this blueprint, however every now and then the automation seems to get a hiccup, where the light turns on, and then immeaditely shuts off. I tried the FAQ, where it describes the issue im facing, but the only difference is, that I only have on singular motion detector at work here (not multiple triggers).
Is anyone facing the same issue of the light turning off suddenly?
Welcome to the community.
I am not finding that here but it can be many things that could cause this.
- You may have another automation (forgot about) that is turning it OFF.
- Communications with your devices to HA.
- Maybe not set up correctlyā¦ if you like to provide your YAML of the automation then I can take a look at it.
Blacky