šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

I would say it is your ambient light settings.

You have min set to 70 and if you are on the latest V4.9 you have a max of 80. So when your light turn on your lux goes above 80 and turn it off.

You have 2 options.

  1. Tick YES in site conditions. It will then not consider max lux.
  2. Tick NO in site conditions. Adjust your max lux higher to give you a ā€œDead Zoneā€. This was the reason I added max lux in the latest release, to stop this. Set the max to say 400 lux and when your light goes ON see what the lux value is then you can adjust max to a setting you like.

Strange thing is the 8 min. I think you have time delay set to 5. If the above is not the problem, adjust the time delay to 6 min, click save and then back to 5 min, click save. In fact now I have read your trace againā€¦ is something else turning OFF your light group? This looks strange.

Let us know how you go.

Blacky :smiley:

Iā€™m on v4.7 still, so the ambient shouldnā€™t be an issue. The time delay makes sense to me since I was in the room for 3ish minutes and then the 5minutes was no activity. I canā€™t find anything that would be shutting off this light group. Is there another spot in the logs I can investigate? Most of the time it works perfectly. Seems like every couple days it gets like ā€œout of syncā€ and this light group flips on/off quickly.

@Nomar383 That is the strange thing as you can see above and below we turn ON and OFF all light domains together. If you can have a look in your logbook to see what turned that light group OFF. Lucky you have the time stamp in the image above so it will be easy to find it by using the filter in the logbook. If you find it can you let us know.

Hello guys, I am struggling to make this work with my fp2. Does it work with presence sensors, and keep light on if presence is still detected ? my lights just turn off after the time delay.

thx

@Anaconda

Yes this is how it should work. If you have multiple triggers then you will need to group them.

On how to set up group sensors please Click Here.

A good starting point is to read ā€œThe Settings & Best Practice Guidelinesā€ Click Here.

If you are still having problems 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.

Let us know how you go.

Blacky :smiley:

Many thanks for your reply. I do have multiple triggers as it is an Aqara FP2 with many zones, but each zone triggers a light or scene. I will also read carefully the guidelines.

Just tried a very simple setting, with only one zone, and one scene, and the lights donā€™t even turn on (Lux settings set to 300 while my sensor is at 190). Here is my yaml code:

alias: FP2 BLUEPRINT Sensor Light TEST
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.chambre_presence_dressing
    light_switch:
      entity_id: scene.dressing_lumiere_naturelle
    time_delay: 1
    include_light_control: []
    include_bypass: []
    motion_bypass_lights_on: []
    motion_bypass_lights_stop: []
    include_night_lights: night_lights_disabled
    night_time_delay: 0.5
    include_night_light_control: []
    night_light_brightness: 4
    night_lights_conditions: []
    night_lights_after_time: "00:00:00"`
    night_lights_before_time: "00:00:00"
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.presence_sensor_fp2_4cbe_light_sensor_light_level
    ambient_light_options: ambient_light_option_disabled
    ambient_light_value: 300

`

Here is the logbook for that sequence:

Thank you, workaround solved the issue!

@Anaconda, just check that in your scene your light turn ON. Run the scene manually and check this. Also remember when using scenes you have to create another scene with everything OFF and enter it into ā€œScenes To Turn OFFā€. Maybe just try it with a light entity first.

1 Like

@Nomar383

See note

Your trigger turn on the automation but another trigger turn off you led light group. Look for this.

Blacky :smiley:

Thank you, it works now. The issue I face now with the FP2, is that when using zones, my ā€œpresenceā€ in a zone in no more detected as soon as I stop moving while the binary sensor for the whole room still detects my presence. I donā€™t know if I did something wrong in my initial setup or this is how the fp2 actually works ? Is the presence detection only working for what they call the fixed binary_sensor, while for zones binary_sensors it does not act as a presence sensor but more like a motion sensor ?

In such a case, it becomes problematic, and the zones detection useless for such a device.

All good, glad your up and runningā€¦ and thanks for getting back to usā€¦ it is realy nice to know :+1:

Blacky :smiley:

1 Like

Thank you very much, but even if it is not the main subject or related, do you have an idea about the other issues regarding fp2 presence from Aqara ?

No I donā€™t have one but I would like one so if Aqara is reading this then PM me and I will fully test it with this blueprint :wink:

Blacky

1 Like

Thanks anyway.

I have another question please regarding the bypass. My light remote that I want to use as a bypass is set up on Hue Essentials app, and connected to Home assistant via the Hue Hub. It controls the lights of the room, including the lights controlled by this blueprint.

Can I use this remote as a bypass ?

First of all, THANK YOU for making this. Iā€™m new to HA and this is the exact sort of automation I adopted HA to take advantage of.

That said, I canā€™t get the dynamic lighting to work and Iā€™m not sure why. I hope I can get some troubleshooting help here.

I have a scene entity set up on a group of hue bulbs that I am trying to have the automation adjust the brightness based on the lux reading from an aqara sensor I have in the room with the lights. I made the following settings:

Max Lux Value = 300
Min Lux Value = 40
Max Brightness Value = 100%
Min Brightness Value = 0%

Iā€™m sitting in the room now and the sensor is reading 923 lux so Iā€™d expect the lights to be off, but they are on at 100% brightness.

Any suggestions on next steps to troubleshoot or additional information that might be needed here to troubleshoot?

1 Like

Interesting, that sensor is in the same large room, but I canā€™t find anywhere it would be turning off this light group.

This was happening when I separated out the 2 LEDs in the group and just had them as individual entities. In that case, one or the other of the lights would randomly turn on/off and become out of sync. Now that I have them as a zigbee group, they at least work or fail together.

Anyway, the only thing that sensor is used for in this automation is the LUX level. Should I not be using a LUX level from a sensor that isnā€™t also the motion sensor for this automation?

@Anaconda

If the switch turns ON and OFF your light then no you canā€™t use it. Example, when the automation gets triggered and turns your light ON and that same switch is the by-pass then it will turn ON the by-pass and it will do whatever you asked the by-pass to do so the main part of the automation will never run. The switch that you use for the by-pass must be totally separate / independent of your light. So if your remote has an independent switch then yes it will work.

Blacky :smiley:

@Nomar383

Hi Kalen, there are a few things you can also check. When this happens check the trace line (the orange line). Also when it happens quickly check all your automation ASAP, the main page and look what just got triggered under the ā€œLast triggeredā€ that may help you find it.

You can use it so that will not be the problem it is just something strange happeningā€¦ if you take out the lux you can see if that fixes it but you probably need to find out what is going on. Maybe also disable the automation and manually turn on the led group and see what happens.

Hope you find it.

Blacky :smiley: