I have had a look at this⌠they will turn OFF but it is not the way I would like it⌠this has been fixed and will be in the next release. The update will be out soon.
I have tested it here it works but because you are using a scene we need to enter in one entity that is in your scene into âLights - Switches - Scenesâ and âNight Lightsâ. If you can enter in a switch from the scene that has no light control that would be the preferred entity but if you canât then just enter in one light entity. The automation needs to see it and it canât see scenes that is why we need just one entity.
So you will have your scene + one entity that it included in the scene. Example below.
Thanks for the reply @Blacky
I have added the Lounge Lamp to âLights - Switches - Scenesâ and âNight Lightsâ just now. The automation will trigger when the sun sets in about 1.5 hrs, and weâll see how it goes tonight.
This worked @Blacky. I added one entity that was included in the Scene and it worked - the Night lights turned on with the configured scene. I noticed in the room & in the automation trace that the initial configured âLights - Switches - Scenes" scene turned off before the âNight Lightsâ scene turned on - so there was a momentary âlights offâ event.
The lights also turned off at the end of the automation time - but I havent figured out if that was the delay timer expiring or the end of the automation timer.
It is delay timer expiring, but that is not what I would like so this has been fixed to turn off at end of condition.
I think you will like the update⌠sorry I didnât want to say anything until it was fully tested, working and ready to be released ⌠sometimes it doesnât make it. If you are just controlling brightness and or colour temp then you can remove your scenes now, enter in the entities, adjust the lights using light control options and tick the new feature box.
Night Lights - Use The Light Control Options - Now you have the option to select âIf lights are ON, adjust the lights when crossing overâ option. It will apply the light control settings to any light that is already ON when crossing over from normal lights to night lights and from night lights to normal lights.
Without selecting this option, if the light are already ON and a night light condition crosses over, then they will keep the current state assuming you are up a bit latter at night or have some friends over and you donât want the lights to go into night mode. Once the lights turn OFF, night mode settings will be applied the next time they turn ON. That is not always the preferred option in every area⌠so you get to choose what scenario you would like by just ticking a box
If any lights are different from normal lights to night lights and are OFF, they will turn ON to the light control settings or OFF if required regardless if you tick the option or not.
Thanks for the update! I want to try this out. Silly newb question, but how to I update the blueprint and all the automation that are built on that blueprint?
Thx for this excellent blueprint!
Iâm discovering HA at the moment. As soon as I start to move all of my home automation from Fibaro HC2 to HA, this blueprint is definitely worth a donation!!!
cool thanks for the tips. Tho I just watched a video of whatâs coming up in the December HA release and they said there is a new update blueprint options being implemented. I will wait for that release.
Hi @Blacky, thanks so much for this blueprint! Itâs amazing and Iâm using it already in a couple of places.
I have 2 questions about more implementation:
How can I set the trigger to be both motion sensor 1 and 2 (not or). In this case Iâm trying to setup a specific area by the door that wonât get triggered when people pass nearby.
Similar but a bit different in another room: Can I setup where motion sensor 1 turns on the light, and the light stays on with either motion sensor 1 or motion sensor 2? (So the light doesnât turn on from motion sensor 2, just using that one to keep the light on).
My lights turn always On between 6:00h and turn Off at Sunrise
My lights Turn always On between Sunset and turn Off at 23:00h
During night time (23:00h and 6:00h) my lights turn on for a few minutes based on my motion sensor.
Lights are ON with 1 but 2 you would also like it OFF at 23:00??? is it ON or OFF?
3 between 23 and 6 = motion.
So
Schedule from 6 to 23 = your motion sensor, then group them but there is a but. The tricky part is the group so you will have to create a template binary sensor for your schedule. So when your schedule is ON your template binary sensor is ON. Then you can group your template binary sensor and your motion sensor and add this group to the trigger. Your done.
I have some examples for template sensors, look at REF - TS-5 Click Here
Item 2 I understand⌠so you will need to crate a trigger binary sensor⌠I dont have an example in my template sensors and not sure if you know what to do so the code is below. More information on what to do with this code is in my examples of the binary sensor. Click Here. Once you create it then you add this binary sensor (only this one) into the trigger.
Things you need to change are:
âbinary_sensor.motion_sensor_1_here = This is your motion sensor 1 entity name.
âbinary_sensor.motion_sensor_2_hereâ = This is your motion sensor 2 entity name.
The things you can change to your liking are:
â2 Motion Sensorsâ = This is the name you would like to call your new sensor.
device class âmotionâ and icon âmotion-sensorâ. = Change to your liking but is should be okay.
template:
- trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_1_here
to: "on"
- platform: state
entity_id: binary_sensor.motion_sensor_1_here
to: "off"
- platform: state
entity_id: binary_sensor.motion_sensor_2_here
to: "off"
binary_sensor:
- name: "2 Motion Sensors"
device_class: motion
icon: mdi:motion-sensor
state: >
{% if is_state('binary_sensor.motion_sensor_1_here', 'on') and is_state('binary_sensor.motion_sensor_2_here', 'off') %}
on
{% elif is_state('binary_sensor.motion_sensor_1_here', 'on') and is_state('binary_sensor.motion_sensor_2_here', 'on') %}
on
{% elif is_state('binary_sensor.motion_sensor_1_here', 'off') and is_state('binary_sensor.motion_sensor_2_here', 'on') %}
on
{% elif is_state('binary_sensor.motion_sensor_1_here', 'off') and is_state('binary_sensor.motion_sensor_2_here', 'off') %}
off
{% endif %}
Awesome blueprint! I have an Aqara FP2 presence sensor in my dining room. I use the FP2 as a trigger for your blueprint. However, due to the configuration of the room (open concept), I want the motion trigger to only trigger if the FP2 reports presence for xx seconds (say 15 seconds); NOT a 15 second delay in turning the lights on. The presence sensor must continuously report presence for at least 15 seconds before the trigger is triggered.
I donât see a way in your blueprint to modify the trigger âonâ period to allow for such a trigger period. Whatâs the best way to do this?
Ok great, thanks!! I will implement this when Iâm back home tonight. (And Iâm new to template sensors so appreciate the faq link.)
Re: item #1âŚIâve tried using one motion sensor in every possible position by/around the zone to trigger the light on the ceiling. But no matter where I put it, there are always accidental triggers when someone walks nearby the area but not into the actual intended area (due to the layout of the hallway/corner). If I use 2 motion sensors across from each other, I can define a specific zone where only both sensors are tripped and not just one or the other. (Kind of like the overlap in a venn diagram.) Is it possible to use the blueprint where both motion sensors need to be tripped together, as the trigger?
Actually⌠looking at your solution for item #2, I wonder if the solution for #1 is also a template sensor, but with these settings:
state: >
{% if is_state('binary_sensor.motion_sensor_1_here', 'on') and is_state('binary_sensor.motion_sensor_2_here', 'off') %}
off
{% elif is_state('binary_sensor.motion_sensor_1_here', 'on') and is_state('binary_sensor.motion_sensor_2_here', 'on') %}
on
{% elif is_state('binary_sensor.motion_sensor_1_here', 'off') and is_state('binary_sensor.motion_sensor_2_here', 'on') %}
off
{% elif is_state('binary_sensor.motion_sensor_1_here', 'off') and is_state('binary_sensor.motion_sensor_2_here', 'off') %}
off
Iâm testing this great blueprintđ, but I need to know if the scenario allows to restore the lighting in the room, after turning it off in absence and on again in presence.
Iâm using an FP2 sensor, and I would like a feature where the light turns off in absence after a certain amount of time (or switches to some sort of scene for absence in the room).
In doing so, Home Assistant will take some sort of âfingerprintâ of the lighting status (on/off, brightness level, color temperature and color of each light) before turning it off.
And when it resumes presence in the room, it will restore the lighting scene to exactly the state before it was turned off in absence.
Is this possible ? Alternatively does anyone have an idea for this ?
Thanks for your quick response and explanation. I will test this coming weekend.
Maybe it s an idea to add an option to the Nightlight to be triggerd on a motion sensor, so a dedicated trigger sensor for night lightsâŚâŚ