I have no idea what you are trying to do, so first you will need to explain it clearly so I can understand.
then
Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on â</>â and paste code in there.
No that is not correct. Even if it was correct the time from the trigger and the light turning ON is milliseconds.
I have no idea what you are saying here but if you preferred your previous automation then why donât you just use that?
Sorry for misunderstanding. I like your automation because is very flexible and has so many options. I appreciate a lot your work and for that reason Iâm asking you because, due to the great and big work you did Iâm sure you have also considered the case I described.
So my main question was if in the automation, when you bypass the ON trigger the off timer is still counting not from the ON trigger, but from the light ON, otherwise this could be the reason why the off automation is not working.
I guess my explanation is clear, anyway just summarize here to be more clear.
I just want to set your automation in this way:
a)
Turn light on on trigger
Turn lights off after 2 minutes the light is on (regardless it was activated by a trigger or manually)
b)
Set âEnable the By-pass - Turn lights ONâ
Switch ON light manually
Wait 2 minutes then the light should switch off automatically
It will only turn the light OFF if the trigger is triggered. If you manually turn the light ON the light will stay ON until the trigger is triggered and the automation runs. But you are happy with âAâ.
I can see you have one by-pass for option 1 and 2 by-passes for option 3. By-pass option 1 is the question you are asking.
Note: When the by-pass is turned OFF it will evaluate the site conditions. If the trigger is OFF it will go through the settings to turn OFF. If the trigger is ON it will start the automation and it will not turn OFF until the trigger is cleared and then time delay has passed, like case âAâ. It is something to be mindful of when testing⌠you may expect it to turn OFF and it is not turning OFF because the trigger is ON when you turn the by-pass OFF.
Looking at your YAML it is not working because you havenât enabled the auto turn OFF option for the by-pass. I will show you 3 ways you can do this so it will help you understand the settings⌠it is totally up to you on what you choose and you can set any time you like. I will recommend 2 ways as it will work better because the automation is waiting to see if the trigger gets triggered in this time period. Remember we are just working on option 1 for the by-pass.
Recommended; This option will turn the by-pass off in 6 seconds and wait for 2 min to see if the trigger is triggered before turning light OFF. If the trigger is triggered in this 2 min time the automation will run. In the By-pass Auto OFF - Time Delay just type the value in â0.1â.
Recommended; This option will turn the by-pass off in one minute and wait for 1 min to see if the trigger is triggered before turning light OFF. If the trigger is triggered in this 1 min time the automation will run.
Not Recommended; This next option will turn the light OFF instantly if the trigger is OFF in 2 min. So for some reason if you are in the room and at that exact point when the by-pass turns OFF and your trigger is OFF the lights will turn OFF leaving you in the dark. Not realy a good idea.
Another option you can do if you use option 2 in the by-pass â2 - Enable the By-pass - Turn lights OFFâ
Then you would just select the by-pass time delay to 2 min. Then if the light is ON when you turn the bypass ON it will turn the light OFF in 2 min and the by-pass will stay ON.
If you would like the by-pass to turn OFF then you would need to select the auto OFF for option 2 and your time. This option will turn the by-pass OFF in one minute and if the trigger is ON it will turn the light ON. If the trigger is OFF the light will stay OFF.
This seems to be the way to go for at least one special mode. Iâve got Movie Mode working. Now I need to see if I can also implement TV mode for the same room.
The lights are not turning off at the end of the Time Options End Time. I set the Time Delay to the number of minutes required for it to coincide with the End Time. Not sure why that is�
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 %}