⚙ Turn Light, Switch, Entity or Scene On & Off with Trigger Conditions

Thanks blacky, will give it a go over the weekend

1 Like

Awesome… Thanks, @Blacky for your blueprints. I think I use all of them now :slight_smile:

Anyway… maybe a silly question. I have enabled the ambient light option, set to trigger at 3 lux. But when will the blueprint actually trigger? (1) When the illuminance sensor is 3 (or below) for the first time, or (2) every time when the illuminance sensor reports 3 lux or lower?

I want to use this blueprint to manage my livingroom lights. But when I go to bed, I turn the light off, and then should remain off (obviously). In case of (2) the light will go on again as soon as the illuminance sensors sends an update.

Edit:
Can you add the option that the illuminance sensor is influenced by the light? Just like you have in the other blueprint?

@beurdy

No it will not work that way.

Looks like you are only needing it at night time. If this is the case then try using the sun condition as it will then work for you. The sun elevation can be very close to a lux value. If this is not the case then let me know.

Blacky :smiley:

No, not really. For example:
Today is a really rainy day. It’s over 30 minutes until sunset, but the light is already really low (below 7 lux in my room) This causes the light to go on/off every couple of minutes. Just because the lights raise the lux again above the threshold…

@beurdy

O okay, let look at a few things then

EDIT: Update to then new version 1.7 and set a dead ban between ON lux value and OFF lux value. Could you please provide some feedback here if it now works.

With the problem of the light coming back ON try and use the global conditions and set the sun as a condition. This should disable it 1 hour after sunset and it should be dark and enable it at sunrise to start the day again. So during the day it will work, once it gets dark the condition stops it so when you turn your light ON / OFF at night it will just be manual control. The light will still turn ON at when it gets dark at night (1 hour offset) but you will have to turn it OFF manually when you go to bed.

1

Blacky :smiley:

New update 1.7

:warning: Some work is required in this upgrade see below.

Upgrade Features :new:

  • Ambient Light Sensor: We have now added a LUX value for ON and OFF. You can now set a dead ban so you light doesn’t turn ON and OFF to fast on a cloudy day.

    :white_check_mark: Below shows the OFF value higher than the ON value. This will work :+1:

    :white_check_mark: Below shows the ON and OFF values equal. This will work :+1:

    :x: Below shows the OFF value lower than the ON value. This will not work :-1:

:warning: :stethoscope: STEPS REQUIRED WHEN UPGRADING :white_check_mark:

If using Ambient Light Sensor then you will need to set your OFF value. Below shows a dead ban of 80 lux.

If you would like to keep it the same before this update then set the OFF vale the same as the ON value. Below show the setting the same as before the update.

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:

For the life of me, I can’t get this blueprint to work and I admit, it is probably user error on something I don’t understand. This is as simple as it gets. Living room lamp, turn on with 100% brightness at 5:45 am. That’s it! It doesn’t run.

Anyone have any thoughts on what I’m missing?

Screenshot 2023-10-23 085406

@ouscotty

Everything looks good. I have tested it here again using a device and your set up, just a different time and it works. Things to look at are;

  1. Do you have the correct device?
  2. If you have the correct device then expand down to an entity. Maybe it not working with your device, it should but stranger things happen. To expand down to an entity click the “<>” button next to your device name and remove any entities that you dont want to control so you just have your light entity. Below shows you were the button is.

Let us know if this works for you.

Blacky :smiley:

Finally had the chance to test v1.7. Tnx for adding this @Blacky!

It is almost perfect… only thing is that if you add a sunrise/sunset to the global conditions, the whole blueprint doesn’t work when this condition is false. Even the manual on/off switch (the by-pass). So when I go to bed, I am unable to turn off the lights :face_with_hand_over_mouth:

So… if the above is correct… can we exclude the by pass from the global conditions?

@beurdy

No problem :wink:

I just checked it here with a global sun condition and it works how it should so not realy sure what you are doing. If you set a global condition for the sun then it will ether allow the blueprint to work or stop the blueprint from running. Maybe try reversing your sun selection.

Blacky :smiley:

Just to be sure… we are discussing this option. Agree?

With that by-pass if the state is ON it will disable the automation. If the state is OFF it will enable the automation. Just tested it again and it is working.

Blacky :smiley:

Still not sure if I understand you.

I want have have a manual (physical) switch that will turn off the lights when I go to bed. Is this by-pass the correct setting for that?

@beurdy

No, you would use the “Use The Entity State Option (Optional)”

Blacky :smiley:

It looks like ON and OFF can only ever be used together.
But if you just want to turn off and not turn on, you can’t use the time feature, right?

I currently use automation in which I switch a light on and off based on brightness. But always switch it off at a certain fixed time.

@Herr.Vorragend

This blueprint just turns things ON and OFF. You can add any condition you like and is why I put it there. So you could add a condition that state must be ON then it will only turn OFF.

To do this, add condition, click state, select your entity, select ON.

Blacky :smiley:

Thanks for the blueprint. A suggestion, maybe move the time setting to the top, instead of the end. For me I need to make semi frequent changes to the time and I would think that this would be the most used section anyway.

Thanks…Steely

Thanks for your suggestion, I will add it to the list and keep it in mind.

Blacky :smiley:

Hi Blacky,

I’m just feeling very stupid, I can’t seem to get the automation to work. I have a hue light and it looks like the only requirement is the first field which is specified with the entity of the hue, which can toggle using the entities page.

what am i missing, i’m so desperate to use some of your great additions.

dumfounded dan

@greenembrace

This blueprint can turn ON and OFF your light. You get to choose what you would like out of the 4 options. You can choose more than one option.

  1. Use The Entity State Option (Optional)
  2. Use The Sun Option (Optional)
  3. Use The Ambient Option (Optional)
  4. Use The Time Options (Optional)

If you are more after a sensor light that works from a PIR type of sensor then look at my sensor light blueprint.

Blacky :smiley: