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

@leejbarker82

Good news thanks for letting us know :+1:

You could just make another automation and use the time feature for daytime.

Blacky :smiley:

correct the binary sensor will do nothing… not sure what your trying to do…

The Shelly 2 dimmer will work with a light switch and you can turn the light ON and OFF. The automation will do this and take over control, so if your turn it ON manually and the automation gets triggered then it will run as per your settings and turn the lights OFF. You will have control of the dim level. If you wire everything up and normal and add the blueprint automation then it will work like this.

If you would like to manually control your lights, then you would need an independent switch connected to the by-pass and you would use “By-pass Switch - Turn lights ON”.

If you would like to PM me we can go through it.

Blacky :smiley:

The reason I tried to get a binary sensor is that the blueprint requires a binary sensor to start the light.

So no need to group the wall switches and the shelly with this blueprint?
And how about the Link the On/Off state of the Switch and Shelly?
Currently I do not have any binary sensors to activate the light.
I only have

  • 1-2 Smart Switch with build in dimmer. I will replace the normal wall light switches and dimmer with this one.
  • 1 Shelly dimmer 2, and this one I will put in the roof cavity.

Tried to use the By-Pass turn lights on, but it still required a binary sensor to activate the lights to start with.

o’h, and I’m located in Australia, which might explain why things are perhaps upside down for me…

I’ve got a cheap Lux Sensor coming from Ali Express, it was only £10 so not holding too much hope,

failing that I’m going to try a automation based on the current weather,

and failing that, I’ll do a time-based automation!

1 Like

@bthuree

This blueprint is used when you have a binary sensor that triggers the automation. I am not sure why you are using it if you just have dimmer switches. You can use a schedule or a time of day helper that will trigger the automation and I have a few lights that do that, ON at sunset and OFF at 11:00 pm. If you would like information on this then Click Here. The most typical binary sensor that would be used as the trigger is a motion or presence binary sensor.

Blacky :smiley:

Just a quick heads up to everyone. If you are also using my :shower: Bathroom Humidity Exhaust Fan blueprint I have recently updated it with an automation link option. This allow you to link this blueprint to it so the lights will say on in your bathroom when having a shower :+1:

Click Here to find out more information on it.

Enjoy

Blacky :smiley:

2 Likes

Hello! Thanks again for the awesome blueprint.

I just wanted to check a use case that I have.
I am using the blueprint with an ON bypass which I have mapped to a switch, and also an ambient light sensor.

It turns out, when I turn on the bypass switch, the lights are still OFF as the blueprint stops where it checks the ambient light.

I was expecting the lights to turn on since the switch was assigned as an ON bypass, expected the bypass to be irregardless of the ambient light conditions. Is this the correct assumption?

My blueprint config
alias: "💡 Sensor Light: Entrance Lights"
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.motion_kitchen_occupancy
    light_switch:
      entity_id:
        - light.light_kitchen_cabinet
        - light.light_entrance
    include_light_control:
      - use_brightness
      - use_transition
      - use_colour_temperature
    include_bypass:
      - bypass_enabled_turn_on
    motion_bypass: switch.switch_common_bathroom_right
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - light.light_kitchen_cabinet
        - light.light_entrance
    include_night_light_control:
      - use_brightness
      - use_transition
      - use_colour_temperature
    night_light_brightness: 80
    night_light_transition_off: 15
    night_lights_before_time: "07:00:00"
    light_transition_on: 0.5
    light_transition_off: 15
    bypass_time_delay: 0.2
    time_delay: 3
    light_colour_temperature: 4600
    night_light_colour_temperature: 3800
    include_bypass_auto_off:
      - bypass_auto_off_enabled
      - bypass_auto_off_enabled_on
    bypass_auto_off_delay: 120
    night_light_transition_on: 3
    night_lights_conditions:
      - time_enabled
    motion_bypass_lights_on:
      - switch.switch_common_bathroom_right
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.illuminance_living_room_illuminance_lux
    ambient_light_value: 12500

Not sure if this helps explain:

Hi Samuel, hope all is well in your part of the world :wave:

No problem at all… and again thanks for your kind words :smiling_face_with_three_hearts:

This is perfect :ok_hand:, and in reading this I can already see the problem in my head. The good news is if I am correct it is a easy fix :wink:. I am just trying to push out a new update for my “Bathroom Exhaust Fan Blueprint” and once done I will fix this.

Thanks for reaching out and providing an easy bug report… legend :smiley:

Blacky :smiley:

1 Like

Hello everyone and thank you again for this blueprint. However, I faced a small problem. I would like to check that a boolean is in the true state in order to activate the blueprint. How can I do ? Isn't it possible to improve the blueprint with input_boolean choices to turn on. Can anyone help me? THANKS

@Skuzmitoo

Firstly welcome to the community :+1:

You will need to use this blueprint.

:gear: Turn Light, Switch or Scene On & Off with Trigger Conditions

Hope this helps you.

Blacky :smiley:

I admit that I’m a little lost, I want to use a motion sensor to light up the office room, with the light conditions etc. that I find in the blueprint. Now I want the light to turn on only when my input_boolean_geek_mode is true. Where can I type this? I don’t see the possibility either in this second blueprint.

You will have to use the night lights option. You will need to enable night lights and enter in your settings. Then in conditions you will enable the state and enter in your input_boolean_geek_mode as shown below.

New update 4.8

Bugs Fixes :bug:

  • Fixed bugs in By-pass operation when conditions are set to analyse the automation and try to preform the correct action.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

3 Likes

Hi,

I’m new to this blueprint, but have been experimenting. I love the flexibility and capabilities. I am particularly interested in the tracker option, but I think it does the opposite of what I want. My use case:

I want to do some alarm type functions - and they should only trigger if my wife and I are NOT home.

I have about 6 app carrying users on my system. Two of us live in the home and the others may be visitors. I have an outdoor yolink motion sensor. When that motion sensor triggers, I want to turn on a number of lights that would illuminate the backyard, and then turn them off a few minutes after the motion sensor clears. All good so far.

My issue is that, I only want it to trigger when two of the users (myself and my wife) are NOT present. (ie not in the “home” zone). So it could be triggered by one of the other users or by a stranger. I believe your blueprint is designed to do tracker triggering only if certain people ARE present - not if a specific set of people are NOT present.

What is the best way to accomplish this? Should I try and build a template for a bypass switch that is active when the two of us are away - or am I missing a simpler way of doing this?

I have multiple zones, so I cannot just test for the two people being in the “away” zone.

Thanks for all your work on this!

@kenwiens

Yes. I have added a new template for you into the FAQ Click Here and look for “REF - TS-8 By-pass Person Sensor”.

Home assistant have a new template helper now that makes it easy for us to add and edit. So you could do this. Go to settings / devices and services / helpers tab / create helper then follow below.

  1. Click template

  2. Click binary sensor

    2

  3. Add your name, state & device class. The click “Submit”

# The code for the state

#For one phone

{{ is_state('device_tracker.your_phone_here', 'home') }}

# Or for more than one phone

{{ (is_state('device_tracker.your_phone_here', 'home')) or (is_state('device_tracker.your_phone_here', 'home')) }}
  1. Enter it into the by-pass

Hope this helps you… let us know how you go.

Blacky :smiley:

Hello, first of all thank you for this great blueprint, it has already brought me very far.

I have recently changed my two lamps in the hallway from normal zigbee bulbs to 30cm large full RGB ceiling lamps (https://www.amazon.de/gp/product/B09H2MHNZM) that provide me with esphome modified 2 entities. A main light and a ambient light.

In my taste optimal for day and night light.

They can also brightness and color temperature but really interesting it is when you can control them with full RGB.

Therefore the question: How high is my chance that you expand your Blueprint in the future with the possibility of RGB control ?

Thank you very much.

Hi @Blacky. After upgrading to HA 23.10I have experienced a problem with the light level when they are triggered by this automation. They seem to be set to 0% either when they are triggered to go off, or maybe when they turn on again (less likely), which leads to very dim lights, and very unhappy wife :sweat_smile:

Any thoughts on what to do, apart from downgrading to 2023.9?

This is the automation:

alias: Stuelys
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.stuesensor
    time_delay: 60
    ambient_light_sensor: sensor.stuesensor
    ambient_light_value: 400
    include_bypass: bypass_disabled
    light_switch:
      entity_id:
        - light.stuekommode
        - light.stuelampe_ny
        - light.stuevindu
        - light.stuespisebord
    ambient_light_options: ambient_light_option_disabled
    include_ambient: ambient_enabled
    after_time: "06:00:00"
    before_time: "23:59:00"
    include_time: time_enabled
    night_light_brightness: 100
    light_transition_on: 0
    light_transition_off: 0

I’m laying in bed right now (to much information…) , but thinking through the blueprint. I mentioned higher up about also supporting a manual switch in parallel to the sensor and I think I have cracked it.

Basically it forms 2 key parts, and I config option

Config the ability to add a switch, which in my case would be a toggle. Probably in the same form area as the sensor input.

Part 1: toggle light on
If presence is off, then this will force the light on… presence will keep monitoring in parallel and when presence is detected and this loop will end as the presence sensor will take over

Part 2: toggle light off
If presence is on and you toggle the switch, then is will force the light off… Once presence is off then this loop will end

Another option might be too have this as a separate blueprint that sits between the presence sensor + switch and your blueprint

I am trying to replace an automation that, between two periods of time, a light is set to 30% unless the light or nearby light has been set above that level. In which case the automation sets the light to the higher level. Is that something that can be done with this blueprint?

@petersv

Hi Peter, Thanks for providing your YAML. With your set up the automation is not controlling your lights brightness at all and it is within your lights that is doing this. If you would like this blueprint to control your light brightness then you will have to enable it and set your brightness. This would be the same if you are using night lights but I can see your not using this option. So you would need to select the “Light Control Options” as shown below.

Let us know if this works for you.

PS: I am having no problems with HA23.10.1

Blacky :smiley: