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
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.
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.
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?
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.
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?
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
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.
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.
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.â
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.
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
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 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?
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.