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

Using this blueprint and all working great (thankd)

I am now trying to use a “Lux Sensor” to trigger a light to come on and off based on the lux value. i.e., if below Lux 10, then turn it on and turn it off once above 10. The trigger sensor is a “Schedule,” i.e., it only turns on between 6am and 6pm.
However, I am getting an error in the HA Logs.

Error evaluating condition in 'Lounge Lux Sensor': In 'condition' (item 4 of 6): In 'or' (item 3 of 8): In 'template' condition: ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ (include_ambient == 'ambient_enabled') and (states[ambient_light_sensor].state | int < ambient_light_value | int) }}' but no default was specified In 'or' (item 4 of 8): In 'template' condition: ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ (include_ambient == 'ambient_enabled') and (states[ambient_light_sensor].state | int < ambient_light_high_value | int) and (expand(light_switch.entity_id) | selectattr('state', '==', 'on') | list | count > 0) }}' but no default was specified In 'or' (item 5 of 8): In 'template' condition: ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ (include_ambient == 'ambient_enabled') and (states[ambient_light_sensor].state | int < ambient_light_high_value | int) and ((include_night_lights == 'night_lights_enabled') and (expand(night_lights.entity_id) | selectattr('state', '==', 'on') | list | count > 0)) }}' but no default was specified

Not sure what this means?

Thanks

I would suggest to keep that separate from each automation.

You can create a separate automation that triggers on changes to your profile helper and then disables /enables automations as needed.
Use

service: automation.turn_off 

service:  automation.turn_off

1 Like

Have you made the sensors into a group via a helper, that would be great! And then please don’t tick any boxes in the group option:

Optionen

If “all entities” is activated, the status of the group is only switched on if all members are switched on. If “all entities” is deactivated, the status of the group is switched on if any member is switched on.

If it wasn’t, @Blacky will certainly help :slight_smile:

Put you helper into the by-pass option 2 turn lights OFF. Then when your helper is on (Holidays) the automation is disabled. This will block the entire blueprint. Just make sure you dont use the by-pass auto OFF for that option #2.

Blacky :smiley:

Stay tuned.

Blacky :smiley:

@disruptivepatternmat

You will need to group all your triggers and then just add the group. It will act like one sensor and the automation will work. Below is the FAQ link on the how to.

Q: I have more than one trigger sensor / binary sensor and my light will come ON then it will turn OFF and stay OFF? - or - The automation is not working correctly with 2 or more trigger sensor / binary sensor and is driving you crazy?

A: Please follow these steps Click Here

Blacky :smiley:

@iculookn

Your sensor is unavailable. I will let you set your default as I don’t know what you would like.

Here is the link for template sensors look at REF - ALS-2

HA as an easy way for us to add template sensors now. So you can do it this way if you like.

Go to settings / devices & services / helpers tab at top / create helper / template / template a sensor / add in a name and the add the below code imputing your lux sensor entity ID. The “0.0” is your default value, set it to your liking. Make sure the device class is “luminance” and submit. Then add this sensor replacing your lux sensor. Now you will have a default and the fault will not be there. But be aware if the automation is not working how you would like it because your sensor is unavailable. Personal I would make sure the sensor doesn’t become unavailable.

Test it and see.

Blacky :smiley:

{{ states('sensor.your_sensor_here')|float(0.0) }}
1 Like

Legend this does help… just to check with this should I presume I should have all of ‘Use The By-pass Auto OFF Option (Optional)’ unchecked?

Hi, I am using this blueprint and really like it.

Just curious, can i use this somehow for the lights to dim say 5 seconds before it is going to switch off? Not a gradual dip but a drop in light so i know to wave my hands in front of the motion sensor lol?

Thanks again for the great blueprint !

Dan

Thank you. have added the sensor template to the automation and will check.

I am not sure why the sensor is “unavailable.” It is a battery sensor, but if I look at the history of the sensor, it doesn’t seem to go offline. it does go to zero?

Thanks @Blacky !!!
I would create another automation, which will start the pump for a few minutes to keep the water circulated at least once per day. But then I guess the bypass „keep the lights current state“ is the right one, correct?
Is then also the night light option bypassed? Because I have also the night option activated.
Thanks
Steffen

@coalfield

You dont need to. Option 1 & 3 can have auto OFF and option 2 will still stay ON. All the by-passes must be OFF for the automation to be active (work). It just means that option 2 will not be auto OFF.

Blacky :smiley:

1 Like

For what your trying to do the automation will only do transition (slowly dim lights). You can however crate a script that will do what you are asking and use the script in the automation. Just remember when adding scripts and or scenes you enter in one entity in.

Blacky :smiley:

This is why “It is a battery sensor” and probably WiFi not Bluetooth. Some try and save batteries by putting it into sleep mode and it disconnects from WiFi. Then it becomes “unavailable.”

Blacky :smiley:

1 Like

If it is to make sure your light ar OFF when you go on Holidays then I would use option 2. If you use option 3 and when you turn the by-pass ON and your lights are ON they will remain ON until you get back from your holidays and turn the by-pass OFF. Once a by-pass it ON you can manually turn your light ON and OFF as required. It is always a good idea to check your light are OFF before you go on holidays. You can also use the “Home Assistant Cloud” to check in if you like.

The by-pass is global it will stop the entire automation.

Blacky :smiley:

OMG RTFM…sorry that worked like a charm. Sorry I didnt go that deep in the helpful docs and such here.

Before I put foot in my mouth again…I have one other thing…but would love to see if people have solved it and I am just being dumb or missed it again :smile:

What I would love is not only a night light but a “morning light”, the same as the night light but for when I wake up. What I have done is created a scene and another automation that stops the one I made using your awesome blueprint. It is triggered with a button when I wake up. I want a nice calm light to come into the morning HAHAHA. Then when I declare morning is over…I have your automations kick in until I go to bed at night. Similarly I would love a “work/hobby/I NEED A LOT OF LIGHT mode”. Here is my use case: so in my living room area I mostly chill and read and hang out. But sometimes I am fixing something or need bright lights ( I have all these horrid recessed lights that could land an aircraft which I keep off, but ideally I can trigger them on, and then off when I am done). What I have done is the same at my wake up / morning light.

Anyone have similar use cases they have cool solutions to?

I just made my night lights last from night till 7.30am in the morning for the same reason.

Not sure if that’s what you’re looking for.

Hi Blacky,

I have been using the updated blueprints for about a week now and almost everything seems to be running fine. I am running into 1 problem tho.

I have ambient lights enabled (15lux, no off-set and effect by lights YES).

I am using motion sensors to turn my lights on but somehow the lights also activate when the 15lux or below is reached. I want to use the ambient lights setting for when the automation is allowed to work, but not as a trigger. Also when the lights turn on with this trigger the lights wont turn off bc the time delay off is not triggered.

Is this a malfunction or is this supposed to happen? and if yes is there a way to turn this off?

Thanks very much - will give this a try

1 Like

I’ve been using Sensor Light for about a year and every year, I support @Blackie with a donation.

Support Blackie’s Work

Blackie gives support to his Blueprints (not just this one) superior to any other developer here. He has 125K views of this page, 7th place of all Blueprints in the exchange. He has 1.4K replies in this thread, I guess half of which are his. And he keeps developing this taking ideas from fellow users. He does it with good grace and an open mind.

My fear is that at some point this will become too much for him as more users discover this amazing add-on. So please, show him some support. And not just once, but every so often. Any amount will demonstrate how grateful you are.

PayPal link to support Blackie

3 Likes