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

I 100% agree! Blacky’s support, innovation, and updates are unparalleled. I’ve donated, and will do so again. He’s an amazing developer!

1 Like

Thank you as well for the blueprint, I’ve been using it for a couple of months in my Hallways and Bathroom, and it’s pretty solid!

I have one question. I’ve purchased two door contacts (binary sensors closed/open), that I’ve mounted in a dressing and I want to control the lights outside it when I open/close its doors.

The problem appears that when I use this blueprint, my room lights turn OFF when I close the dressing doors, and I would like that my lights turn to “PREVIOUS STATE”. I’ve read that this capability is not possible at the moment, is it possible I could code or link some other thing to control this?

Would something like this work:

  • Create a scene with entities status (scene.create “prev_state” → snapshot_entities)
  • Instead of turning off, run the scene.prev_state?

@disruptivepatternmat

You may have to get creative with by-passes and have separate automations.

Blacky :smiley:

What you will find is your trigger is ON but your lights are OFF, then when your trigger is still ON and LUX drops below it turns the light ON. If your trigger was OFF then when the LUX drops below the lights sill be OFF. This is what we are asking of the automation.

That seams strange, do you have a trigger that is ON?

Looks like you have a trigger that it ON. Can you check this please and let us know.

Blacky :smiley:

Hi,

There is no trigger thats on when the lights are triggered by the ambient light LUX value. The lights are triggered just by the ambient light setting itself.


HA log sensor

As seen here the LUX triggers the lights at 15:24:27 and at that time there is no occupancy by the sensor (bottom picture)

And only when occupancy is detected by my selected trigger sensor the delay starts as seen with a detection at 17:19:17 and light going off at 17:33:48

Normal situation with a short walk in the room and a delay of 10 minutes is shown in red.

@A-Little-late

Hi,

I have just tested it hear again and it works perfectly.

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.

Blacky :smiley:

alias: 09(blueprint)-Licht woonkamer
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.sensoren_woonkamer
    light_switch:
      entity_id: light.woonkamer
    time_delay: 10
    include_light_control:
      - use_brightness
    light_brightness: 50
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.presence_sensor_fp2_7c50_light_sensor_light_level
    ambient_light_options: ambient_light_option_enabled
    ambient_light_high_value: 15
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id: light.woonkamer
    include_night_light_control:
      - use_brightness
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "01:00:01"
    night_lights_before_time: "06:59:59"
    ambient_light_value: 15
    include_bypass:
      - bypass_enabled_stop
    motion_bypass_lights_stop:
      - media_player.tv_klijnstra
    include_bypass_auto_off: []
    include_sun: sun_disabled
    sun_elevation: 6
    sun_elevation_rising: 6

here ya go :slight_smile:

All looks good. I also just tested again here using the same lux values, brightness levels, etc. I also set up the by-pass the same and tested it and it worked perfectly.

Can you please check again.

Blacky :smiley:

Will do, if it happens again in the next few days I will let you know :slight_smile:

Hello @Blacky!

Was wondering if it could be possible to add humidity sensor to your blueprint?

What I am trying to archive is the following:

When the lights turn on in the restroom using a motion sensor, to avoid turning off due to lack of motion by using the humidity sensor. When people take showers the humidity rises almost 100% and that’s a sign of people taking showers thus keeping the light on.

I know I could just add time but that defects the purpose of turning off and conserving electricity (I pay crazy rates)

Thoughts?

Blacky has a separate blueprint called “Bathroom humidity exhaust fan” which does what you want.

1 Like

Ohhhh didn’t know. OK I’ll check it out.

Thanks!

I just went through that blue print, and does not do what I want. Is very limited to what it does with lights.

I think is still a good idea for humidity to be an option on the light blueprint.

Ideas are also welcome?

You can create a template sensor that returns true when humidity is high, then use that as a ON bypass or Do nothing bypass.

1 Like

@parallelsys

It will do what you are asking. You have to use this “sensor light blueprint” and the “Bathroom humidity exhaust fan” with the automation Link.

First you have to set up the “Bathroom humidity exhaust fan” blueprint. This will control your fan when you have a shower. You have to set up a “Derivative Sensor Helper” first (it is easy) and there is a guide on how to get this working correctly Click Here.

Once you have set up the “Derivative Sensor Helper” all the settings are explained Here.

You then keep your “sensor light blueprint” to control your lights but you use the automation link in the “Bathroom humidity exhaust fan” blueprint to keep the lights ON when having a shower. This is all explained in my full set up Here. We use it 5 time a day and it work every time.

Setting it all up can take some time to get your head around it (maybe make yourself a coffee), but I think it is worth the effort.

If you dont have any fan control in HA yet then you can plug your fan into a smart plug, it is that easy.

Blacky :smiley:

2 Likes

When the wife is screaming because lights went off during a shower… Trust me everything is worth it!

HAHAHAHA

At any rate, I don’t have automated fans, maybe this would be the time to look in to it!

Thanks again for your detailed response and for all those who posted ideas and or recommendations.

For those with experience doing this, could I use a smart switch to control the fan? IE: turn on and off?

just wanted to report: I now use 7 Aqara Presence Sensor FP2 in the entire basement and am 99.8% satisfied after the updates. Even in the shower with steamed-up window panes, it recognises movement and the light stays on.

I put them all in one corner, so there’s no blind spot as they cover 120 degrees. I have printed the bracket.

Absolutely - this is the way to do it.

2 Likes

I am so confused by the By-pass functions. The nomenclature is killing me and I cannot for the life of me figure it out. My scenario is the following:

  1. I have two lamps (Nanoleaf bulbs) both plugged in to constant power.
  2. I have an Aqara FP2 presence sensor.
  3. the lights turn on when someone is in the room and off after 8 minutes and adjust according to the light sensor in the FP2. So far so good!
  4. I just got a Tapo matter light switch and installed it. It is not connected in any way to the lamps or their circuit and isn’t actually connected to any load at all.
  5. ???

Do I have to have the switch control the lights outside of the automation? Can someone explain what will happen with each of the bypass options? And how do they work together? Can you enable all of them with the same entity (I.e. my switch)? How would that function?

I think the way I want it to work is that if the lights are on because they were triggered by motion, then the switch would turn them off. If the lights are off for whatever reason, then the switch would turn them on. After some amount of time, e.g. 30 minutes, the lights would begin responding to motion again.