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

@pushpinderbal

Welcome to the community.

Thanks for your kind words.

The automation keeps re-triggering on motion thus resetting the time delay. I do however have a way that if you manually turn the light ON and the light is OFF it will turn ON a toggle helper thus turning ON the bypass. You can do this with a template sensor or I do have a blueprint so you can just select the entities but I not 100% happy with it so I have never released it.

Maybe I can release it as a beta.

Blacky :smiley:

@chriskyte

Welcome to the community.

You can but you will need to think outside of the box. If you create a template binary sensor that when your camera is_dark it set a value of 25 and when it is not is_dark it set a value of 100. You then use that template sensor in ambient and set low to 30 and high to 70. Now your is_dark will work like a lux sensor. Just copy paste the entity ID of your new template sensor into the Ambient Light Sensor and it should work.

Blacky :smiley:

@fumantsu

f you use the motion sensor to turn the light ON, you can then use dynamic lighting to adjust the brightness based on the LUX value in the room. When no motion is detected, the light will turn OFF after the motion sensor clears and the set time delay has passed. If you want to keep the light OFF (even if there’s further motion), you can use the bypass option 2.

Blacky :smiley:

I think I managed to deal somehow with the dynamic lighting, it is kind of tricky especially if you use the ambient settings which I think somehow can “override” the dynamic lighting.
Also I didn’t get how to turn off the desk light when I open the ceiling one from the switch (smart one)

@fumantsu

I assuming that if you turn ON your ceiling light you would like the desk light to turn OFF. If that is the case then add your ceiling light into bypass option 2. Note your ceiling light must not be used in lights input. I can’t see your YAML so I a assuming a lot of things.

Blacky :smiley:

That worked nicely, thanks
As side note, it will be good to put a note for the min values between ambient and dynamic if both are in use. If ambient is lower then it will prevail.

1 Like

Hi @Blacky, thank you for your reply. Great suggestion, I will set this up!

Chris

1 Like

Hi Blacky, thanks for this great blueprint. I’m using it in some of my lights around the house and it’s working great!
Did you ever think of a similar blueprint but to control air conditioning? Do you happen to have one already done? Or maybe it’s a good idea :slight_smile:
I have 3 AC units I’d like to control based on occupancy/temperature and a blueprint like this would make it much easier.
Thanks!

Any solution available for the following:
When lights turn off at daylight, they are white. My night lights are using red light (they don’t support color temperature).

So when they turn on for the first time in the night via the scene they are white and change to red immediately. That flashing is kinda disturbing.

@PeL4

Thanks for your kind words.

Yes I have about 7 other blueprints I have not shared yet.

Blacky :smiley:

@chris400

Yea it can be a bit annoying I have the same for my bathroom lights going from night mode to daytime. It is typically in the light. I will put it on my list to look at.

Blacky :smiley:

2 Likes

My suggestion would be a “pre-off” scene which gets applied before the off scene. I wouldn’t mind the lights coming on with a low brightness and then turning fully on throughout the day. That would be less annoying than the other way round.

Hi @Blacky what an amazing blueprint! Thank you so much for your assistance with the community.

I would like to do a slightly simplier model of your night light example at the start of this thread - basically have my night lights on very dim throughout the night (best would be using the sun based condition), but if someone walks by they go up to a brighter value, then back down again after the motion time goes by.

I realize I can use the scenes/scripts but it seems very complicated to set up and not scabable as I have a lot of these lights throughout the house.

I think a feature request to set an “off” level that is not strictly off (e.g. a brightness, color, etc. for when the night is “off”) when you are in night light mode would be an incredible feature. So the light goes to it’s normal level when triggered, but back to the “off” level when untriggered. And when you are not in night light mode you’d use normal day settings (perhaps having an off level there could be useful too).

I think this would be a simple but expansive addition!

Thanks again for all your wonderful help.

Also, I’m using ThirdReality’s WiFi night light/motion sensors - and the transition time does not seem to do anything at all. Even seeing it 4-5 seconds, the lights just switch on and off. I’m not sure if anyone else is using these lights? They are really great for the blueprint otherwise.

Hello. This is my first post and I’m very happy to be here.

I am a total newbie and have not yet even installed Homeassistant. I have set up some shelly relays on my desktop as a test with switches and regular dumb lightbulbs to begin my exploration.

I usually research stuff by myself, but I thought what the heck, why not ask people?

This blueprint looks like it might do what I am thinking of doing. Can anyone tell me if I’m proceeding in the right direction?

In short, I want my hallway light to come on at night when I get up to use the bathroom.
I would like to set up a behaviour such as below:

These are my priors:
I am in the UK
I have some hallway lights with two way ON/OFF flip switches, wired in the conventional UK style.
I am able to access easily the neutral wires at the ceiling rose
I am not going to change the switches. This is non negotiable. I am keeping the dumb switches. The switches stay.

This is the behaviour I want to introduce to the lighting:
I want to introduce a dimming module - shelly dimmer 2 at the moment.

I want to introduce motion control - I can do hard wired sensors, or any of the Zigby/wifi/bluetooth based ones depending on what ecosystem I fall in love with.

I will set dimming to a schedule at:

100% between 04hr01 and 21hr59 (Day)

20% between 22hr00 and 04hr00 (Night)

Motion control will turn lights on on motion, and turn off 30 seconds after the last motion detection.

Switches will work as ON/OFF.

ON will turn lights on, according to the dimming rule, for 10 minutes, after which the motion sensor rule will be followed.

OFF position will turn off lights and cause motion detection to be disregarded for 2minutes, after which the motion sensor rule will be followed.

I want to be able to override the dimming during the night cycle to 100%.

Can this be done by:

If the switch is in the on position and the lights have been triggered by motion - Flip OFF-ON to trigger 100% for 2 minutes,

If the switch is in the off position and the lights have been triggered by motion - Flip ON to trigger 100% for 2 minutes.

after which the dimming rule and motion sensor rule will take over the dimming and on state.

If I lose my network, or homeassistant goes down, switches should behave as normal on/off switches, Maybe to the dimming schedule, or ideally to 100% dimming.

Should I start with this blueprint? Or can I set this sort of thing up within the devices?
Am I going about this the wrong way entirely?

@tman98

Without saying to much… well… I have this planed and I think it will be called night glow. This is high on the list to do once I get some time to develop it (really busy at the moment) Thanks for your suggestion.

Regarding transition… some lights don’t support it but try typing 60 sec in and see how you go.

Blacky :smiley:

@MonkeyRob

I use Shelly dimmers and have a hallway that is 100% during the day and 5% at night with 3 motion sensors down the hallway. I use time as you would like to change from day to night. Works perfectly and you will never have to turn ON / OFF a light ever again.

And now the question is… are you going to install a free version of HA and a free version of this blueprint?

Let the fun begin and welcome to the community.

Blacky :smiley:

1 Like

Are we able to temporarily toggle/modify certain sections of the automation?

For example: In my setup I created several modes using input_booleans, and I want to the Light control timeout to change from the usual 5mins to be extended to 10mins when ‘Guest’ mode is selected.

I’d imagine I can set this up using the helper somehow?

Thanks

Just updated HA, and now my helper " bee in the bee hive" doesn’t work as written anymore, it needs a more descriptive “state” now?? “String does not match the pattern of “legacy_syntax””
trigger state
condition state
numeric trigger state
condition trigger state

Edited-

Figured it out…

1 Like

Amazing! Looking forward to it!

1 Like