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

@parallelsys Yes you can as long a s HA can turn it ON and OFF. Also when doing this consider being able to have a independent switch to turn the fan ON and OFF. Example rather than use a Shelly 1PM use a Shelly 2PM. Then use the 2nd contact for manual control.

I personally use a Shelly 3PM as I have 3 exhaust fans. 2 bathrooms and 1 toilet. I then use a esp32 to do the rest.

So the ESP32 will do

  • Humidity sensor.
  • LUX sensor.
  • Motion Sensor.
  • Manual Fan Switch.
  • And it can do a door contact sensor for the room with a bath and then use my “Bee In The Hive” sensor.

It is all explained in my set up on how I did it with all the code for the ESP32.

Hope this helps you.

Blacky :smiley:

1 Like

@Seger85

Nice one… thanks for the update and letting us know :+1:

Blacky :smiley:

@kman42

Hi Kurt

It can be confusing but I will try and explain.

Steps 1, 2, 3 & 4 you all good :+1:

First you cant enable them all with the same entity. I will try and explain.

We have 3 by-pass options. Each option will preform a function (action).

Option “1 - Enable the By-pass - Turn lights ON” = when you turn the by-pass on it will turn the lights ON if lights are OFF.

Option “2 - Enable the By-pass - Turn lights OFF” when you turn the by-pass ON it will turn the lights OFF if lights are ON.

Option “3 - Enable the By-pass - Keep the lights current state” when you turn the by-pass ON whatever state the lights are in being ON or OFF it will keep this state, like a pause button.

When any by-pass is turned ON the automation is disabled and you have full control to turn your light ON and OFF as you see fit.

When you turn the by-pass OFF it will evaluate the site conditions and try and preform the correct action. Example if you turn the by-pass OFF and your lights are OFF but your motion sensor is ON it will turn the lights ON and run the automation.

So you can see if you use the same entity when your turn it ON what is it going to do option 1, 2 or 3. Cant work that way.

Then you have a by-pass time delay that works when you turn a by-pass OFF. It helps when evaluating the site conditions before turning your lights OFF if they are ON then leaving you in the dark.

Then you have the auto OFF. Each one related to and option you use, option 1, 2 or 3. If you are using option 1 and you would like the by-pass to turn OFF after X amount of time then enabling “Enable the auto OFF for the by-pass switch - Turn lights ON” will turn the by-pass OFF automaticity. It can serve as a timer or you can force your lights ON for X amount of time and when it turns OFF it will evaluate the site conditions. The other auto off selections are for option 2 & 3.

This could be because you have more than one trigger and you will need to group them or because you have all the by-pass set up incorrectly could be the problem.

Hope this helps and I haven’t confused you even more.

Blacky :smiley:

1 Like

Thanks for this info! Helped alot. Looking to ordering some soon.
Another question, I am using the Lux controlled brightness option along with the ambient light sensor option.I have a sensor that gets affected by the light lux (I have this set to YES), as it turn on the lux increases to over 290 causing a back and forward between dim and not dimmed.

Seems like a rave in my restroom LOL.

How can I remediate this?
The current lux is around 50 when on is about 290…

@parallelsys

In the "Ambient Light Sensor - Site Conditions" select the “Yes” option.

Blacky :smiley:

I did, and still does it. :frowning:

@parallelsys

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:

1 Like

Ignore the names in the sensor as I move them and cant rename them because smartthings won’t change them in the integration.

alias: Sensor Light Master Bedroom Restroom
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.master_restroom_sensor_motion
      - binary_sensor.office_motion_sensor_motion
    light_switch:
      entity_id:
        - light.master_bedroom_sink
        - light.master_bedroom_main_lights
    time_delay: 10
    include_light_control:
      - use_brightness
      - use_transition
    light_brightness: 100
    light_transition_on: 0.5
    light_transition_off: 10
    after_time: "18:00:00"
    include_time: time_disabled
    before_time: "08:00:00"
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id: light.master_bedroom_main_lights
    night_time_delay: 10
    include_night_light_control:
      - use_brightness
      - use_transition
    night_light_transition_on: 0.5
    night_light_colour_temperature: 5000
    night_light_transition_off: 10
    night_lights_after_time: "00:00:00"
    night_lights_before_time: "06:30:00"
    ambient_light_sensor: sensor.master_restroom_sensor_illuminance
    include_ambient: ambient_enabled
    night_lights_conditions:
      - time_enabled
    night_light_brightness: 20
    dynamic_lighting_lux_sensor: sensor.master_restroom_sensor_illuminance
    ambient_light_options: ambient_light_option_enabled
    dynamic_lighting_min_brightness: 0
    include_dynamic_lighting: enable_lux_controled_brightness
    dynamic_lighting_max_lux: 400
    dynamic_lighting_heartbeat: 1

@parallelsys

Can you please group your motion sensors and test it. How to set up group sensors please Click Here.

Blacky :smiley:

New update 5.5

Bugs Fixes :bug:

  • Fixed bugs in By-pass option when entering by-passes entities in a disabled option and entity is ON preventing the by-pass option from running correctly.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

2 Likes

Testing and will report back.

Thanks!

Did that and still the same issue.

BUT

I change the sensor for the Dynamic Light - Ambient Light Sensor to my secondary (The one away from the light) and it stopped going back and forward. I was also able to confirm that when I go back to the main Sensor it flips back and forward between dimmed and 100%…

Both Sensor (Main Sensor and Secondary Sensor) are Z-Wave and both have the same settings…

  • 20 Second Motion Sensor Delay
  • High Sensitivity
  • 8 Minute Report Interval

@parallelsys

I see, this will be the dynamic lighting control. You can use the transition to slow this down. You heartbeat is 1 min and your transition is 1/2 second to 10 seconds. You will have to adjust the transition and the heartbeat. Maybe start with your transition greater then your heartbeat 2:1 ratio. The transition slider you will have to type your values in and click save. Also positioning the LUX sensor were it will be less effected by the lights will help to.

Let me know how you go, as it will help with future development.

Blacky :smiley:

1 Like

Got it. Will report back.

New update 5.6

Bugs Fixes :bug:

  • Fixed bugs in By-pass option when two or more by-pass were ON and one turned OFF.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

3 Likes

Is it just me? I get the following error while trying to import your Blueprint:

Invalid blueprint: extra keys not allowed @ data[‘blueprint’][‘input’][‘ambient_light_sensor’][‘selector’][‘filter’]. Got None extra keys not allowed @ data[‘blueprint’][‘input’][‘dynamic_lighting_lux_sensor’][‘selector’][‘filter’]. Got None extra keys not allowed @ data[‘blueprint’][‘input’][‘end_scenes’][‘selector’][‘filter’]. Got None extra keys not allowed @ data[‘blueprint’][‘input’][‘motion_trigger’][‘selector’][‘filter’]. Got None extra keys not allowed @ data[‘blueprint’][‘input’][‘people’][‘selector’][‘filter’]. Got None extra keys not allowed @ data[‘blueprint’][‘input’][‘zone’][‘selector’][‘filter’]. Got None

Please update your HA, looks like you may be on an old version.

Blacky :smiley:

1 Like

Will you be adding a Lux controlled brightness + color temp option? I love the lux controlled brightness, but really really want it combined with sun elevation color temp.

2 Likes

+1 this. I would love to see this.

1 Like

Hi, this is super cool and saves a lot of work creating automations but I can’t make mine turn on the lights using an occupancy sensor. The lights turn off though and pretty fast ignoring the cooling off period I set up. What am I doing wrong? Thanks!