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

@ausratty Hi ausratty, first welcome to the community.

Thanks for your kind words, glad you like it.

Yea you can. One way is to add a binary sensor (see below). You will then need to add this into your “configuration.yaml” file. Restart required after adding it.

Disclaimer I didn’t test this :crossed_fingers:

your_camera_name_here = the new id of the new sensor. Change as you like
Your Friendly Camera Name Here = change as you like
binary_sensor.your_camera_motion_sensor_here = this is the camera sensor you are using now. Replace it with your one.

binary_sensor:
  - platform: template
    sensors:
      your_camera_name_here:
        friendly_name: 'Your Friendly Camera Name Here'
        device_class: motion
        icon_template: mdi:cctv
        value_template: >
          {{ is_state('binary_sensor.your_camera_motion_sensor_here','on')}}
        delay_on:
          seconds: 3

Then add this sensor to your trigger sensor in the blueprint.

A better way would to be to adjust your camera settings to stop the false triggers. Maybe a camera that detects humans and or cars. Turret cameras… I have found to be 100% better than domes outside.

Hope this helps you.

Awesome thanks mate ! Appreciate your help. I’m using unifi G4’s just where I need to fire the lights it doesn’t pickup “humans” quick enough. So this should fix the issue :smile: Thanks again ! Will keep a close eye on this.

@ausratty No problem at all. Let us know how this goes as I am interested in using cameras as the trigger.

HA Release 2023.1.4 Update

There was a bug in “Home Assistant 2023.1.0 to 2023.1.2” effecting our blueprint. This prevented you from being able to select the light targets saying “nothing found” when trying to select one.

I reported the issue to HA and can now report that Home Assistant has resolved this in the latest release of 2023.1.4. :partying_face:

Thanks again for your patiences and to all the team at Home Assistant for all your hard work :+1:. It’s why I believe it’s the #1 home automation of choice.

Blacky :grinning:

3 Likes

Ha, I was just going to ask this question! Thanks for the great work!

YES… It works… thank you for this awsome blueprint :slight_smile:

2 Likes

New update 2.3

When Home Assistant fixed the bug effecting our blueprint in 2023.1.4 they also fixed a bug being able to remove entities from entity selector by just clicking the X and then saving. Because of this we have removed wording description for clearing 2 entities selections.

  • Trigger Sensor By-pass
  • Ambient Light Sensor

Enjoy

Blacky :grinning:

Would really love if you would add the possibility of selecting which weekdays to run so you can have it run differently during the weekends, where my kids like to sleep in and don’t want the lights to turn on when it is time to get up :wink:

TY for nice blueprint! :slight_smile:

1 Like

@martinbergandersen Good idea, I had it on my list to do. It will be out in the next release.

New update 2.4

Added the option to select weekdays under the time options.

Enjoy

Blacky :grinning:

What an awesome blueprint. It may be that the script does what I am trying to do already and I missed it - else it’s a feature request for consideration.

Before switching lights off, I am looking to implement a warning dim (or scene) for the definable duration, eg. lights dim down to 15% for one min before switching off or a scene for one min before switching off.

When the warning dim is active if movement is detected then lights back on as normal.

Much appreciated,
D

Thanks for your kind words and I am glad you like it. :slightly_smiling_face:

I have seen this issue before and a lot of people try to have the lights dim so they can wave their hands around so motion is detected again and the lights stay on. This is a common problem with motion sensors.

Could I suggest some possibilities that you may want to explore? :thinking:

  • Would it be possible to delay the off for your motion sensor? Sometimes this can help.
  • Have a look at the presence sensors. I hear they work well but you must also have a motion sensor to get the best of both worlds. See link above.
  • Think of something that is ON when you are in the room. Example, I helped someone create a binary sensor for their computer that detected when it was ON. They used a motion sensor and the computers binary sensor in their office with this blueprint. So when motion was detected entering the office the lights would turned ON. Then they turned on the computer so the lights stayed ON. When the left the office they turn the computer OFF and left so no motion would be detected and the lights turned OFF. Mabe something similar would work…
  • Distance sensors can work well in toilets.
  • Have a look at the Binary Sensors for more options.

This way you may resolve the lights going OFF and or dimming all the time.

Hope this helps :slightly_smiling_face:

This seems like the best of the motion sensor blueprints! One question: is there a way to add some sort of ‘crossfade’ time to the options? When I was previously running everything through a Hue hub, motion sensor activated scenes would nicely fade up over a second or two. Now I’ve moved everything to Home Assistant, changes just snap instantly which isn’t quite as nice. I’m a beginner so maybe I’m missing something on how to achieve that…

1 Like

Hi @edmooredop firstly welcome to the community. Thanks for your question and your suggestion. I will put it on my list of suggestions. I personally use Shelly dimmers and they have a nice fade built in.

1 Like

Hi everyone, just found this blueprint for my kitchen lights. It’s been working flawless, thanks for the work.

I wanted to ask, is there an easy way to allow a bypass of the OFF function?

Basically I’m happy for lights to go off normally a while after not detecting presence, but I’d like a way to override that from the switch itself, since this switch controls also the extractor hood, so I want it to stay ON even when we leave the room but something’s being cooked.

I tried manually switching OFF and ON the switch manually, hoping then the automation wouldn’t turn it OFF for that “session”, but it still did. Also checked the by-pass option, but it says I cannot use that same switch.

How can I achieve this? :S

Hi @Chaoscontrol

No problem glad you like it.

RE By-pass

The by-pass can not be a entity that is also included in “Lights - Switches - Scenes” and or “Night Lights” because if the automation turns the entity ON then it also turns ON the by-pass and it will not work as intended. Hope that make sense.

Your by-pass can be any other switch that has a ON and a OFF state. Example: It can be a physical switch on the wall, a contact sensor, a smart button or any binary sensor, etc. You choose.

If you do not want to have a physical switch then see or FAQ on how to set one up in Home Assistant.

Once you set up the by-pass correctly you will be able to turn ON or OFF your lights as normal and the blueprint will not effect them.

Hope this helps you

Blacky :slightly_smiling_face:

Maybe I have misunderstood the by-pass, but what I would like to achieve is an on/off entity that would only block the light turning off when the motion time-out expires.
I could then use the state of my Harmony remote to block the lights turning off when watching TV and I’m not moving around enough to trigger the motion sensor, resulting in furious arm waving!

@sota Your Harmony remote, do you have a status in HA (on/off) for this? Or your TV do you have a status (on/off) in HA. If you do then group your triggers together (see FAQ on how to do this), motion sensor and TV. Then you trigger will always be ON when watching TV and your lights will stay on until you turn off your TV and no motion is detected.

Then add the by-pass as described in FAQ so if your watching TV you can turn ON the by-pass and turn OFF your lights (if watching a movie for example).

Thanks, but the Harmony has state of “off” or else the current action such as “Watch TV”. If I group it with the motion sensor, won’t that prevent the lights turning on if the TV is off and motion is detected?

No. If you group them then any one entity will send a ON state to the trigger. So you TV can be OFF and your motion can still trigger the trigger as it normally would do.

you could also add them separately.

You may have to do a template for your Harmony so “Watch TV” = ON.