Is there a way to add a conditional that if the lights are already on, that the script doesnāt fire? Have a few of the soffit lights in the kitchen set up to turn on with motion after sunset. The problem Iām having is if someone goes into the kitchen and turns on all of the lights, after a few minutes HA decides the movement is new and fires the script, which changes three of the 6 lights brightness, then after the set time, they shut off.
You can do this all in your script. If the light is ON then do nothingā¦ if light is OFF then turn light ON.
Blacky
Hello sorry for the delay here my config:
alias: Lichtsteuerung
description: "** Badezimmer **"
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.badezimmer_motions
- binary_sensor.badezimmer_presence
light_switch:
entity_id: light.spiegellampe
time_delay: 0.5
include_light_control:
- use_transition
light_brightness: 100
light_colour_temperature: 5000
light_transition_on: 1
light_transition_off: 5
include_bypass:
- bypass_enabled_turn_off
motion_bypass_lights_off:
- input_boolean.blocker_badezimmer
bypass_time_delay: 0
include_bypass_auto_off: []
bypass_auto_off_delay: 120
include_sun: sun_disabled
include_ambient: ambient_enabled
ambient_light_sensor: sensor.average_badezimmer_helligkeit
ambient_light_options: ambient_light_option_enabled
ambient_light_value: 10
include_time: time_disabled
include_device_tracker: zone_people_enabled
zone: zone.home
people:
- person.marco
- person.marion
include_night_lights: night_lights_enabled
night_time_delay: 0.2
include_night_light_control:
- use_transition
night_light_brightness: 15
night_light_transition_on: 1
night_lights_conditions:
- entity_state_enabled
night_lights_entity_state:
- switch.mode_sleep
ambient_light_high_value: 60
include_dynamic_lighting: disable_dynamic_lighting
dynamic_lighting_min_lux: 10
night_lights:
entity_id: light.spiegellampe
night_light_transition_off: 2
dynamic_lighting_min_brightness: 15
dynamic_lighting_max_colour_temp: 8000
dynamic_lighting_min_colour_temp: 2200
dynamic_lighting_heartbeat: 0.25
night_light_colour_temperature: 2500
dynamic_lighting_max_lux: 350
motion_bypass_lights_stop: []
Thanks Marco, I could replicate the error log. I see if I can resolve it but just setting it to default (0) is not going to work. Let me have a look at it.
Blacky
I know there is a full on faq guide on how to use Bypass, but finding it quite overwhelming, and complicated for a single function. But, Could you explain in layman terms on how to prevent Lightās from automatically turning off when trigger is used?
Iām using Door contact sensor to Turn on Lights, but I donāt want it to turn off the lights at all.
Thanks
Ues this blueprint and use the state ON only. This way when you open the door the light will come ON and you will have to manually turn it OFF.
Smart Light - Entity - Sun Elevation - Ambient & Time Triggers
Blacky
Hi @all, Hi @Blacky,
im a newby with this Blueprintthings and try your Smart Light/Sensor Light for my use case as first.
My use case is quite simple: The plan is, to switch a light on by time and it will change the colour-temp and Brightness by Sun Elevation. Also light switch off by time.
I startet with Sensor Light: The Trigger is a scheduler-Helper, Light is a zigbee-entities (yes, itās green! ) Light Control is active for brightness and transition. Use Colour-Temp and Dynamic Lighting Option 6. Settings are default.
What happened: Light donāt switch on, or off, but if I switch it Manuel on, the Brightness and Colourtemp is changing.
If I use smart light, the light will be switched by automation, but the brightness and Colourtemp donāt changed.
I run both automation for a time, but I will a clean solution.
Can you help me, where I have to look for the error?
Kind Regards Paul
hi all, @Blacky . i have a question, and apologies if itās been answered already (please just point me there if it hasā¦)
i want to use this blueprint to control a couple of WLED strips and until HA and WLED sort it out and allow colour temperature control, iāve opted to use the RGBW setting in this automation. it switches the light on to my selected RGBW value, but then i canāt see how it adjusts it through the day. i have option 8 selected but the effective temperature of the lights seem to stay the same through the day. am i missing something?
@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!