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

Hi @Blacky,

Quick question about bypass.
I want to stop the automation to run when I have a set scene switched on. Not sure about the mode I should go between ON and OFF.

For example, I have an automation for lighting a room but when I switch on a scene, I want that scene to stay as long as it is switched on without having the automation to run.

Thanks

For the life of me I canā€™t get my mind around this!!!

Iā€™ve setup a BINARY GROUP for my motion sensors, all these being Shellyā€™s (Motion 1, Motion 2 and Motion BT).
The group appears to be setup properly, meaning both HIDE MEMBERS and ALL ENTITIES are switched OFF.

As a matter of facts, the binary entity goes ON whenever either motion sensor gets triggered.

Here comes the part where I get confusedā€¦

Even if the Sensor binary group goes ON, UNLESS IT IS THE BT SENSOR being triggered, the automation doesnā€™t start!!!

What am I missing??

Had the same issue. For me it was the illuminance sensor used for the ambient feature. Apparently zigbee2mqtt also received an update this week and all motion sensore now report lux as ā€œilluminanceā€ instead of ā€œilluminance_luxā€ and it seems to take quite a while until that propagates. Also, ā€œilluminanceā€ used to be in use for something else before, so you might not even notice anything missing in your Sensor Light config. See more on this issue here:

Thanks but it cannot be as the binary group itself goes on regardless the sensor.

The odd issue is that despite the binary group going on, unless the actual sensor activating the binary group is the BT Shelly, the lights are not being switched on.

I donā€™t get how thatā€™s even possible tbh!!!

The trigger is the binary group not the entities behind it, so why it only trigger automation when the entity that activates the binary group is the BT sensor rather than one of the WiFi sensors??

HI All,

I have a situation where I have some smart light switches that control my exterior lights. I have the automation set so that when cctv motion is detected, it enables the relevant switch outputs to turn on/off the lights - but if I want to turn on the lights manually, and then I walk outside, the lights turn off. A bypass switch adds complexity where there doesnā€™t need to be any - quite literally if the lights already on, then the motion trigger should be ignored unless the motion trigger triggered it previously. Is there any way to configure this with this blueprint ? Thanks heaps for putting it together by the way, its briliant, I just canā€™t sort this last little bug out. :slight_smile:

1 Like

@mase @tretabyte

Here it is.

:stop_button: Manual Control Status Tracker

Enjoy

Blacky :smiley:

1 Like

Iā€™ve found the culprit!

Let me recap the configuration:

Lights activated by GROUP SENSORS (pir 1, pir 2, pir 3)
Ambient enabled reading status from pir 3

Expected outcome: when either of the sensor behind the group would trigger AND luminosity is below 200lux, lights go ON.

Actual outcome: only when pir 3 is activated and luminosity is below 200lux, lights go ON.

It happened to be a conflict between the group and the single luminosity sensor.

SOLUTION: created a LUMINOSITY SENSORS GROUP reading the median value from pir 1, pir 2, and pir 3.

No more conflicts and automation behaves as expected.

I hope this helps somebody in the future and perhaps the author may want to look into this to avoid this kind of conflict in the next releases as not all motion sensors may also include a luminosity sensor and there might be cases where someone may need to society a single luminosity sensor rather than a group of it.

@JorgeMaTeixeira

You will need to create a template binary sensor to invert it. Once created then use it in the automation.

To create a Template binary sensor, follow these steps:

  1. Navigate to Settings > Device & Services > Helpers tab at the top.
  2. Click the Create helper button.
  3. Select Template and then choose Template a binary sensor.

Next, provide a Name and Device class of your choice. If applicable, you can link this template to an existing device so it appears under that deviceā€™s details.

In the State template field, add the code below, replacing binary_sensor.your_door_entity_id_here with your entity ID.

{{ is_state('binary_sensor.your_door_entity_id_here', 'on') }}

Blacky :smiley:

1 Like

@Hugoliv

Thanks for your input. I note this in the list of suggestions.

Blacky :smiley:

1 Like

@TheMinimalist

If you would like to disable the automation from running then you will need to use the bypass.

Blacky :smiley:

@NW4FUN

This is extremely strange.

If you created a group with all your motion sensors in it and you monitor this group seeing it turn ON when any motion sensor gets activated, and when all are clear then the group should go OFF / Clear.

You then just use this group in the trigger (not the motion sensors), then the automation is only looking at the group for the trigger and it should react to it.

Blacky :smiley:

@aijii

I just release another blueprint that will handle this for you.

:stop_button: Manual Control Status Tracker

Enjoy

Blacky :smiley:

@Blacky

Iā€™m aware of how it SHOULD work. The reality is that it doesnā€™t behave in the expected way IF the ambient option is enabled AND it is pointing at a single sensor rather than a group.

If you read my previous posts, Iā€™m reporting that despite the sensor group being triggered regardless what sensor behind it is giving the input, the automation doesnā€™t activate unless the sensor behind the group matches the sensor used as ambient.

You may want to test this in your lab and look at why it is creating conflicts.

For completeness of info, sensors are all Shellyā€™s, namely Motion Sensor 1, Motion Sensor 2, and BT Motion Sensor.

I hope this helps

EDIT: the ambient option prevents the whole automation to switch on lights. Had to disable it in order to have a functioning automation

1 Like

@NW4FUN

Everything works perfectly hereā€¦ even using the Shelly lux sensor in ambient.

Check your group entities and the entity your using in the ambient section.

Blacky :smiley:

Thanks for this new tool Blacky. It could be very useful in the right circumstances.

1 Like

@Blacky

Iā€™m not sure what either you or I are missing hereā€¦

Hereā€™s my config to make it easier for you

And hereā€™s whatā€™s behind the 2 sensor groups:

Hereā€™s the YAML configuration to make sure nothing bizarre is being inherited from somewhere:

Whatā€™s your take??

Is anyone using multiple Shelly Blue Motion sensors together with this blueprint? Iā€™m having mixed results. Sometimes the automation turns on the light (when motion is detected) and sometimes it doesnā€™t.
Looking in the Shelly app I can see there is motion. Iā€™m trying to get three of these to work together in one large 2 storey hall. If upstairs and motion is detected turn on lights (for 15 mins). If downstairs turn on lights for 15 mins. Then between the hours of 12am and 9am only leave lights on for 5 mins.

Here are my settings. I donā€™t think there is anything wrong with the blueprint, but if so can someone let me know?

description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.hall_motion_sensors
    light_switch:
      entity_id:
        - light.hall1
        - light.hall2
    time_delay: 15
    include_light_control:
      - use_transition
      - use_colour_temperature
      - use_brightness
    light_brightness: 25
    light_colour_temperature: 2700
    after_time: "16:00:00"
    before_time: "09:00:00"
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - light.hall1
        - light.hall2
    include_night_light_control:
      - use_brightness
      - use_colour_temperature
      - use_transition
    night_light_colour_temperature: 2700
    night_lights_after_time: "00:00:00"
    night_lights_before_time: "09:00:00"
    end_scenes: []
    include_time: time_enabled
    include_sun: sun_disabled
    sun_elevation: 3
    night_light_brightness: 15

@NW4FUN

Everything looks good.

Looking at the point of your screenshots the automation would not run because your lux group is at 81.5 and for it to run it must be below 60. Because you selected Yes - My Ambientā€¦ once your light is ON the automation will ignore your lux group.

Blacky :smiley:

1 Like

@jgriffin

All you need to do is in the night light settings you need to Enable time option as this is the condition you would like to use to enable night lights. See below.

Blacky :smiley:

Hi @blackey, Iā€™m struggling a bit to understand the interaction between normal lights, night lights, and night glow lights in the audomation.

ā€œNormalā€ lights set in the top section clearly go on when triggered by the trigger sensor, that makes sense, using the Light Control settings.

I presume Dynamic Lights affects the lights set in the top lights section, as does Ambient and Time. Does Device Tracker also affect those lights?

Ok, now we have Night Lights. A separate set of lights can be set in this section along with the ability to have an entity state option, time option, and sun elevation option.

Do those three options automatically turn on the night lights when they are enabled? Is there anything now to do with the trigger set in the top section and if so how does this interplay with the trigger set in the very top section? And what happens to the lights if they are duplicated with lights in the ā€œnormalā€ lights section at the top.

Then lastly we have a separate set of lights that can be set to be Night Glow. But these have no time, elevation, or other setting for when Night Glow is enabled. Does this follow the times in the Night Lights section? And if so, now what is the difference between a Night Light and Night Glow as it seems like you can set either to go on/off at times or sun elevations, and there may be desire to take action when a trigger happens - but if the trigger just activates the ā€œnormalā€ light then I canā€™t see how a night light and night glow are any different from each other. When a trigger happens, which light setting now takes over, the ā€œnormalā€ light at the top or the night light?

Iā€™m sorry if my questions are confusing because the interplay of the three is confusing me. In some ways I dontā€™ understand what Night Glow is vs. Night Light specifically in how they function (and interplay with the normal light settings and trigger).

Thanks!