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

I recently upgraded to the newer version of the sensor light, and now my automation does not work anymore. I use my Unifi doorbell camera as my binary sensor for person detection, which then turns on our front porch switch and lights. The lights are then adjusted to 100% brightness and 5000K.

Since the upgrade, this automation no longer works. I have rebuilt it several times with no luck. Any help would be greatly appreciated.

Here is my automation setup. I do not have a copy of the old version.

id: '1699286846215'
alias: Front Entry Person Detection
description: Script triggered by a camera when a person approaches the front porch
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.20102_leithcrest_way_frnt_door_person_detected
    light_switch:
      entity_id:
        - light.wiz_rgbw_tunable_6bd442
        - light.wiz_rgbw_tunable_6bbae2
        - scene.front_porch_lights_on
    end_scenes:
      - scene.front_porch_off
    include_sun: sun_disabled
    time_delay: 7
    dynamic_lighting_max_lux: 900
    dynamic_lighting_min_lux: 0
    night_time_delay: 0
    after_time: '16:30:00'
    before_time: '08:00:00'
    light_transition_on: 0
    night_light_transition_on: 0
    include_light_control:
      - use_colour_temperature
      - use_brightness
    bypass_auto_off_delay: 1
    include_time: time_enabled

Here is the second automation I have created trying to perform the same task, using the same sensor and lights.

alias: Front Door Person Detection ver. 7
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.20102_leithcrest_way_frnt_door_person_detected
    light_switch:
      entity_id:
        - light.wiz_rgbw_tunable_6bd442
        - light.wiz_rgbw_tunable_6bbae2
        - scene.front_porch_lights_on
    end_scenes:
      - scene.front_porch_off
    time_delay: 7

@Blacky
Is there anyway for the “Bee In The Hive Sensor” to only keep the light on once the door is closed? AKA
Motion is detected, light turns on, timer starts
Door closes, timer stops till both door opens and motion is not detected
If that is possible anyways…

1 Like

@WilliamHill

Try this.

template:
  - trigger:
      - platform: state
        entity_id: binary_sensor.your_door_sensor_here
        to: "off"
      - platform: state
        entity_id: binary_sensor.your_door_sensor_here
        to: "on"
        for:
          seconds: 10
      - platform: state
        entity_id: binary_sensor.your_motion_sensor_here
        to: "on"
    binary_sensor:
      - name: "Bee In The Hive"
        device_class: occupancy
        icon: mdi:account-box-outline
        state: >
          {{ is_state('binary_sensor.your_door_sensor_here', 'on') and is_state('binary_sensor.your_motion_sensor_here', 'on') }}

Blacky :smiley:

@cvbrundige

Below is your YAML to adjust the light to 100% brightness and 5000K. Look in Light Control I have selected the options there. Copy and paste it in… you may need to set your time condition up again.

alias: Front Door Person Detection ver. 7
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.20102_leithcrest_way_frnt_door_person_detected
    light_switch:
      entity_id:
        - light.wiz_rgbw_tunable_6bd442
        - light.wiz_rgbw_tunable_6bbae2
        - scene.front_porch_lights_on
    end_scenes:
      - scene.front_porch_off
    time_delay: 7
    include_light_control:
      - use_brightness
    include_light_colour_control: use_colour_temperature

When updating to V7.0 there was some work to do. Click Here for more details.

Blacky :smiley:

@Yaksha

Hi John,

Yes this is how it works.

When the door is closed if it detects motion in the room it will turn the Bee In The Hive sensor ON. It will stay ON until the door opens. Once you create it you then group it with your motion sensor, you then add that group to the trigger not the individual sensors.

The sensor is good because you can use it for whatever you like and it is not tied to a blueprint.

Please see link for more information on it.

Blacky :smiley:

1 Like

@Blacky
PERFECT!! Thank you!
I am just now figuring out all of the crazy stuff you can do with your blueprint… I am sure I will have more questions in the future. lol

1 Like

I really love the customizability of this blueprint, however every now and then the automation seems to get a hiccup, where the light turns on, and then immeaditely shuts off. I tried the FAQ, where it describes the issue im facing, but the only difference is, that I only have on singular motion detector at work here (not multiple triggers).
Is anyone facing the same issue of the light turning off suddenly?

@Hometoza

Welcome to the community.

I am not finding that here but it can be many things that could cause this.

  1. You may have another automation (forgot about) that is turning it OFF.
  2. Communications with your devices to HA.
  3. Maybe not set up correctly… if you like to provide your YAML of the automation then I can take a look at it.

Blacky :smiley:

I use something similar, but in my case when some light was turn it on manually the automation do not run, and the light stay On all the time untill I turn it off. In that case the motion sensor switch the front light again on and off

description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.bewegungsmelder_occupancy
    include_light_control:
      - use_brightness
      - use_colour_temperature
      - use_transition
    light_transition_on: 0.5
    light_transition_off: 2
    light_brightness: 90
    light_colour_temperature: 2500
    light_switch:
      entity_id:
        - light.flurlicht_1
        - light.flurlicht_2
        - light.flurlicht_3
    time_delay: 2
    night_time_delay: 1.5
    include_night_light_control:
      - use_brightness
      - use_colour_temperature
      - if_lights_are_on_adjust_when_crossing_over
      - use_transition
    night_light_brightness: 5
    night_light_colour_temperature: 2500
    include_night_lights: night_lights_enabled
    night_lights_conditions:
      - time_enabled
    include_bypass:
      - bypass_enabled_turn_on
      - bypass_enabled_turn_off
    motion_bypass_lights_on:
      - input_boolean.bypass_flurlicht
    night_lights_after_time: "23:00:00"
    night_lights_before_time: "07:20:00"
    night_lights:
      entity_id:
        - light.flurlicht_1
        - light.flurlicht_2
        - light.flurlicht_3
    include_bypass_auto_off:
      - bypass_auto_off_enabled_off
    motion_bypass_lights_off:
      - input_boolean.flurlichter_bypass_off
    bypass_auto_off_delay: 5

This is my blueprint. Not a lot of fancy stuff happening here IMO :open_mouth: thank you for the warm welcome and answer :slight_smile: Before i was using a mqtt group that grouped my 3 lights as one, but it behaved very similar

re. the WLED colour temp: can you tell me what your relevant settings are in both HA and WLED? I wonder if I’ve got one of those adrift somewhere: the WLEDs will do colour temperature beautifully in WLED natively but not in HA so it must be somehting I’m doing…

@Hometoza

When updating to V7.0 there was some work to do. Click Here for more details.

Below is your YAML

description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.bewegungsmelder_occupancy
    include_light_control:
      - use_brightness
      - use_transition
    light_transition_on: 0.5
    light_transition_off: 2
    light_brightness: 90
    light_colour_temperature: 2500
    light_switch:
      entity_id:
        - light.flurlicht_1
        - light.flurlicht_2
        - light.flurlicht_3
    time_delay: 2
    night_time_delay: 1.5
    include_night_light_control:
      - use_brightness
      - if_lights_are_on_adjust_when_crossing_over
      - use_transition
    night_light_brightness: 5
    night_light_colour_temperature: 2500
    include_night_lights: night_lights_enabled
    night_lights_conditions:
      - time_enabled
    include_bypass:
      - bypass_enabled_turn_on
      - bypass_enabled_turn_off
    motion_bypass_lights_on:
      - input_boolean.bypass_flurlicht
    night_lights_after_time: "23:00:00"
    night_lights_before_time: "07:20:00"
    night_lights:
      entity_id:
        - light.flurlicht_1
        - light.flurlicht_2
        - light.flurlicht_3
    include_bypass_auto_off:
      - bypass_auto_off_enabled_off
    motion_bypass_lights_off:
      - input_boolean.flurlichter_bypass_off
    bypass_auto_off_delay: 5
    include_light_colour_control: use_colour_temperature
    include_night_light_colour_control: use_colour_temperature

Blacky :smiley:

@iandogherty

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.

I am not the guru on WLED but I love it. I know on the WLED discord there are so many people to help and very willing, they also use HA… hats of to them. Maybe ask on that forum but I use it here and it works perfectly never missing a beat. Below are one segment of the LED I use if that helps any.

144

Blacky :smiley: