💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

Feature request: when using bypass it’d be great if I can choose wich action I wanna use:

  • Use The Light Control Options
  • Use The Dynamic Lighting Options
  • Use The Light Control Options
  • Use individual Options (new)

Why? Because I use the dynamic Lightning Option with maximum 70% brightness. When I need more light I wanna bypass too 100% brightness.
But it seems when normal light control AND dynamic light control are configured, only dynamic will take effect. So I wanna bypass to “normal” light control (with 100% brightness).

@hazio

There are only 2 input of different light settings. One I call normal lights and the other is night lights.

Blacky :smiley:

@TylonHH

You only need toggle helpers when;

Dynamic Lighting

Used in options 1, 2, 3, 4, 5, 6, 7, 8 or 9 - If you have chosen a brightness level of 0%, then it’s essential to create an independent toggle helper and enter it here.

Scenes & Scripts - Toggle Helper

To ensure the smooth operation of the automation, it’s recommended to create an independent toggle helper when selecting a scene or script in “Lights - Switches - Scenes - Scripts” above and then enter it here.

Night Lights - Scenes & Scripts - Toggle Helper

To ensure the smooth operation of the automation, it’s recommended to create an independent toggle helper when selecting a scene or script in “Night Lights” above and then enter it here.

Blacky :smiley:

@TylonHH

Thanks for your suggestion I will put it on the list of recommendations.

For now you can ether, adjust the light brightness manually when you turn ON the bypass or have a simple automation that will turn the brightness level to 100% when you turn on the bypass.

Blacky :smiley:

1 Like

Hello, nice blueprint. Thank you!

Can you implement a hue like dim option before lights go off? Like 50% brightness for 10 seconds or so before turn off? I know transition OFF setting can be used, but I think hue way is more elegant.

Hello, very nice blueprint, i use it for all my lights. Thanks for the hard work! :slight_smile:
In my bathroom i have a motion sensor that controls the light. The only annoyance is when someone showers. The motion sensor cannot see a person in the shower, mainly because the shower curtain is not transparent. Now, i’ve placed a temperature (and humidity) sensor in the bathroom, and i want the light to stay on while the humidity is above 65%.
I can see here in your blueprint:


That it allows a bypass entity. I’m not sure how that works and how the bypass is triggered (is it just triggered by the entity switching from any state to any other state?) but i was thinking that i would be able to get the functionality i wanted by making a sensor/helper that reads the humidity and when the humidity is above 65%, the sensor/helper is “on” and the rest of the time it is off. Can you tell me if that would work?
I know this is out of the scope of your blueprint, but can you maybe also tell me what kind of sensor it is and where to click to create it? I have no idea how to do it.

Anyway, thanks in advance!

Hi and thanks for this awesome blueprint.
I am trying to make the Bee in the hive to work with my setup but its not working.
Made the sensor in the ui like your guide but the sensor dosent change state att all, its always off. What am I doing wrong?

Here is my template and I’m using Aqara door sensor and Hue motions sensor.

template:
  - trigger:
      - platform: state
        entity_id: binary_sensor.aqara_door_sensor_badrum_door_4
        to: "on"
      - platform: state
        entity_id: binary_sensor.aqara_door_sensor_badrum_door_4
        to: "off"
        for:
          seconds: 10
      - platform: state
        entity_id: binary_sensor.hue_motion_badrum_motion
        to: "on"
    binary_sensor:
      - name: "Bee In The Hive"
        device_class: occupancy
        icon: mdi:account-box-outline
        state: >
          {{ is_state('binary_sensor.aqara_door_sensor_badrum_door_4', 'off') and is_state('binary_sensor.hue_motion_badrum_motion', 'on') }}

Sorry, but I don’t understand why this needs to be this complicated.
Can you explain me why I can’t just have a scene to turn on the lights, a scene to turn on lights with 10 percent during night and another scene to turn everything off? Why an additional script and a helper?

I have something similar, but with power, when TV is running. So I created a helper with Threshold helper. It gets on or off when the conditions are set.
And the helper you use for bypass.

Could it be, that it is because my Motion Sensor is publishing the occupancy twice?
Im now trying to set the mqtt QOS to 2 , hopefully to prevent this.
Because I couldn’t find the light being immediately switched off.
If that doesn’t work i might be trying the ‘debounce’ option

Thanks, it seems like i made it work with a threshold helper! :slight_smile:

In addition to my earlier comment, i have a schedule sensor (at this time use this brightness, at that time use that brightness and so on) that i would like to implement to my bathroom lights. The states values are the percentages of the brightness, so at 10:00 it might be “20” and at 17:00 it might be “50”. Can that somehow be used with your template?

@barisahmet

Thanks for your suggestion, I done use hue but I will look into it.

Blacky :smiley:

@Strux

Now you have a humidity sensor in the bathroom maybe add a smart switch for the fan. You then can use my :shower: Bathroom Humidity Exhaust Fan blueprint to turn the fan ON and it will also keep the lights ON. In the FAQ of that blueprint I show my full set up and how I do it.

You could also us a door contact sensor so when you are in the bathroom and motion is detected it will keep the light ON until you open the door. To do this I have developed a template sensor called :honeybee: Bee In The Hive Sensor :honeybee: and this shows you how to do it, click here. This way when you are behind the shower curtain it will keep the lights ON.

Personally I use my :shower: Bathroom Humidity Exhaust Fan blueprint with this blueprint to achieve everything.

This would be done by using night lights and using night light time option and set when you would like the lights at 50% so from 17:00 to 07:00. Then set up your night lights.

Hope this helps you.

Blacky :smiley:

@Bogdis

It all looks good. When you close the door and your door sensor goes OFF for 10 seconds is your motion sensor ON?

Is there a delay for you door sensor or is it instant?

Did you reload the templates or restart your HA after you made the changes?

Blacky :smiley:

@danielo515

You can and you don’t need a script. You can use a scene or a script or just your light entities with no scene or script. It is totally up to you. But if you would like to use a scene or a script it is recommended to add a helper because scenes and scripts have no state… so in order for the automation to know if the lights are ON it looks at the helper to ensure the smooth operation of the automation.

Blacky :smiley:

Hi,

Here is a video with what’s happens.
Video

Hue motion badrum Motion - this is the motions sensor

Aqara Door Sensor Badrum - this is the door sensor

Badrumsensor Grupp - this is the group

Badrumsensor Template - and this is the template sensor

you can see in the video that the door is closed then when I open the door the motions sensor gets triggered and the door sensor closes. The group sensor is on until the motion clear then It changes to off and last the template sensor is always clear.

There is no delay for the door sensor as you can see inte the video.
I set upp the template sensor inte the UI because in the configuration.yaml I get errors when I add it and it dosent work.

I hope you can help me I really want this to work :slight_smile:

Edit:

Managed to make the template work by changing the code from - platform: state to - trigger: state and it seems to be working now but I still have a problem, the lights still turn off when someone is in the room and the lights won’t turn off when exiting the room.

I have a problem with your template. In my kitchen i have it turn on 2 different lights, when motion is detected. However, the LED strip under my kitchen cabinets slowly turn on for about .2-.5 seconds and then turn completely off, while the ceiling light turns on as it should. Do you have any idea why that happens?

Blueprint config:

id: '1729173428057'
alias: BevÌgelsesaktiveret lys Køkken
description: ''
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.kokken_sensor_bevaegelse_aqara_occupancy
    light_switch:
      entity_id:
        - light.kokken_controller_ledstrip_miboxer
        - light.kokken_lampe_loft_shelly
    time_delay: 1
    include_light_control:
      - use_brightness
      - use_transition
      - use_colour_temperature
    light_transition_on: 3
    light_transition_off: 10
    light_colour_temperature: 3500
    night_lights:
      entity_id: light.kokken_controller_ledstrip_miboxer
    include_night_light_control:
      - use_brightness
      - use_transition
    night_light_transition_on: 3
    night_light_transition_off: 3
    night_lights_after_time: '23:00:00'
    night_lights_before_time: '05:00:00'

Sunds very promising with the Bee in the hive automation! I’ve read about it and tried implementing it, but i can’t seem to figure out where to input the code?
Is it a helper? An automation? Should i put it into configuration.yaml, under sensors?

  - trigger:
      - platform: state
        entity_id: binary_sensor.badevaerelse_sensor_dor_aqara_contact
        to: "on"
      - platform: state
        entity_id: binary_sensor.badevaerelse_sensor_dor_aqara_contact
        to: "off"
        for:
          seconds: 10
      - platform: state
        entity_id: binary_sensor.badevaerelse_sensor_bevaegelse_aqara_occupancy
        to: "on"
    binary_sensor:
      - name: "BadevĂŚrelse Optaget Sensor"
        device_class: occupancy
        icon: mdi:account-box-outline
        state: >
          {{ is_state('binary_sensor.your_door_sensor_here', 'off') and is_state('binary_sensor.your_motion_sensor_here', 'on') }}

I have a radar motion sensor which reports how far movement is away…
It is reported in “large”, “medium” and “small”
Is it possible to just use for example the state “small” as a trigger, so the lamp only goes on when i am in a small radius?
How could i achieve this?
Thanks!