šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

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.

@barry99705

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 :smiley:

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: []

@clipse

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 :smiley:

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

@iona

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.

:high_brightness: Smart Light - Entity - Sun Elevation - Ambient & Time Triggers

Blacky :smiley:

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! :slight_smile: ) 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 :smiley:

@iandogherty

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 :smiley:

@Yaksha

It would be them most FAQ I get and it is #1 FAQ. Glad you got it workingā€¦ hope you like it.

Enjoy

Blacky :smiley:

1 Like

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.

@jlh1

Welcome to the community.

Take a look at this blueprint :high_brightness: Smart Light - Entity - Sun Elevation - Ambient & Time Triggers and use the stat ON only.

Blacky :smiley:

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.

@WilliamHill

The best way to do this is to use my :honeybee: Bee In The Hive Sensor :honeybee: 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 :smiley:

How do I get my hands on the bee in the hive sensor ?

@WilliamHill

You can create a template binary sensor using the code I provided (:honeybee: Bee In The Hive Sensor :honeybee:) 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:

  1. In Home Assistant, go to Settings ā†’ Add-ons ā†’ Add-on store.
  2. Search for ā€œFile editorā€ and click on it.
  3. Click ā€œINSTALL.ā€

Using the File Editor:

  1. Toggle the ā€œShow in sidebarā€ option to access it easily from the main menu.
  2. Start the add-on.
  3. Refresh your browser; youā€™ll see ā€œFile editorā€ in the sidebar.
  4. Open the File Editor, click the folder icon in the top-left, and find the configuration.yaml file.
  5. 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:

  1. Go to Developer Tools ā†’ YAML.
  2. 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 :partying_face:. Read the information on :honeybee: Bee In The Hive Sensor :honeybee: 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 :smiley:

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!