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

Call me crazy, but using this blueprint, I canā€™t find a way to only trigger when a specific Binary Sensor is ā€œonā€. I thought there was a condition option at one point, but I no longer see it.

@Simon_DE

Your ā€˜Dynamic Lighting - Min Brightness Valueā€™ default value is ā€˜0ā€™ so try setting this to ā€˜10ā€™ as ā€˜0ā€™ = OFF. See if that works for you.

Blacky :smiley:

@pgale

I have been really busy at work and will be back to normal in about a week. I just tested it hear and I will need to fix this. Please donā€™t use the helper for the scene for now and look out for the update.

Blacky :smiley:

1 Like

@Bobie

Nice one.

It is just transition over a time window that you get to set.

Blacky :smiley:

No problem. Thanks very much.

1 Like

@jameswestcott

What you would do is have a independent switch that turns the bypass ON (Not the light switch). Then you your use ā€˜1 - Enable the Bypass - Turn lights ONā€™ and add that switch into the pass. When you turn ON the switch it will turn ON the bypass that will turn ON the light. When you turn OFF the bypass then the automation will check the site conditions and keep the lights ON of turn it OFF depending what the site conditions are. You also have a ā€˜Bypass - Time Delayā€™ and you can also use the ā€˜Bypass Auto OFF Optionā€™. If you would like to test this then you can create a toggle helper and use that at the bypassā€¦ then pretend the toggle helper is your independent switch and see how it will all function if you were to add a independent switch.

Hope this helps

Blacky :smiley:

@chassio

You can put your binary sensor in the ā€˜Trigger Sensor - Binary Sensors - Scheduleā€™. That is the trigger.

Blacky :smiley:

Hi Blacky,

Sorry but Iā€™m sill having problems - the light comes on at the correct time (dims up to 100%) and again at the correct time it dims down to 1%. However thereā€™s no transition time it is on 100% the down to 1% without transition.

Iā€™m again probably doing something wrongā€¦

Again any help would be much appreciated.

Trying to send the YAML code but get this:

An error occurred: Body is limited to 32000 characters; you entered 417522.
Bobā€¦

@Bobie

You are sending the wrong YAML follow the steps below.

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:

My apologies. I think I worded that poorly. My intent is to use a secondary binary sensor as a condition. Specifically, I want this automation to trigger when my PIR sensor detects motion but only while my mmWave binary sensor is ā€œoffā€

@chassio

No problem, then you would use the bypass for this. When the mmWave binary sensor is ā€œoffā€. Use this mmWave binary sensor in your bypass and select the bypass you would like to use, option 1, 2 or 3. Each bypass option will do a different action when the mmWave binary sensor state goes to ON. I think you are after option 2 or 3 but you get to decide.

Blacky :grinning:

Ok, I just attempted this, but I had to create a template to mirror the binary sensor as a Switch as this blueprint does not accept binary sensors in the Bypass Switch selections. Here is the code for that:

switch:
  - platform: template
    switches:
      mmwave_switch:
        value_template: "{{ is_state('binary_sensor.everything_presence_one_mmwave', 'on') }}"
        turn_on:
          service: switch.turn_on
          data:
            entity_id: switch.mmwave_switch_on
        turn_off:  
          service: switch.turn_off
          data:
            entity_id: switch.mmwave_switch_off

I then used Option 3, and I think it is working now. I just have to find a way to change my mmWave ā€œonā€ latency to something beyond the current 2 second max. Iā€™m using the mmWave sensor as a blocker for bed occupancy. I want to prevent lights from turning on while someone is in the bed. I am open to suggestions to do this in a better way.

Hi Blacky,

I hope you donā€™t get fed-up with meā€¦itā€™s a hard learning curveā€¦

Timmer helper is from 4pm until 9pm

Below is the YAML dumpā€¦

alias: Outside light tester
description: Outside Lights on and off
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - schedule.a_test_light_schedule
    include_sun: sun_enabled
    light_switch:
      entity_id: light.my_test_moer_zigbee_dimmer_light_2
    include_light_control:
      - use_brightness
      - use_transition
    light_brightness: 100
    light_transition_on: 600
    light_transition_off: 0
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id: light.my_test_moer_zigbee_dimmer_light_2
    night_time_delay: 0
    include_night_light_control:
      - if_lights_are_on_adjust_when_crossing_over
      - use_brightness
      - use_transition
    night_light_brightness: 1
    night_light_transition_on: 600
    night_lights_conditions:
      - time_enabled
    night_lights_after_time: "20:00:00"
    night_lights_before_time: "21:10:00"

Thanks again for the help.

Bobā€¦

Thanks @Blacky thatā€™s useful information. Iā€™ve tested it and it works as you describe, however, I donā€™t want to have an independent bypass switch. My logic really need to beā€¦ if the light is on when the door opens then donā€™t activate the timer.

I was thinking of using a helper that mirrors the state of the door but is conditional on the status of the light and use that as the trigger for Sensor Light. So if the light is on when the door opens Sensor Light never gets triggered.

Is there an option to skip the automation if the light is already switched on? iā€™m sorry! iā€™m pretty new in this stuff. it would the great if you could help me with that!

@Sickpumpkin This is what Iā€™m also looking for. Doesnā€™t appear to be built in at the moment and the preferred method is to use a separate bypass switch which doesnā€™t work for me. Iā€™ve been trying two solutions which work, just deciding which is betterā€¦

  1. Have a 2nd automation which disables the Sensor Light automation when you donā€™t want it to activate.
  2. Have a helper binary switch which mirrors your trigger sensor but add whatever conditions you want. Then use that helper to trigger Sensor Light.
2 Likes

You could try that and see if it works for you.

Blacky :smiley:

1 Like

@Sickpumpkin

Welcome to the community.

No there is no option for this. Best way to have manual control is to use the bypass.

Blacky :smiley:

1 Like

@Bobie

All is looking good, the only thing I can see is in your night lights you have a brightness setting of 1%. Some lights will not work at a low value like this and could be the reason they are not staying ON. Try to increase it to 5% or 10%ā€¦ a % value they will work at.

Let us know if I am on the right track.

Blacky :smiley:

@chassio

It will accept a binary sensor into the bypass.

Some people like using a bed occupancy sensor. If you would like a DIY then I would try this one first, click here.

I personally use do not disturb (focus in apple) on my phone.

Blacky :smiley:

1 Like