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

@hazio

Just out of curiosity, what sensor are you using?

Looking at your YAML I can see a few things. Could you change a these items and test it first.

  1. Not sure if you would like to use “Dynamic Lighting” as you have enabled it but it will require a LUX sensor and nothing is entered. So if you don’t want to use it can you disable this and if you would like to use brightness it is in the light control. Next to “Dynamic Lighting” input there is a link that will show you how to use it if you like.

  2. In night lights you have a 50% brightness set but you have not selected light control brightness for night lights. If you would like to use brightness for night lights can you select brightness.

  3. You could also disable sun in night lights as you are also using this in the global settings with default values that are the same.

Let us know how you go.

Blacky :smiley:

@ruaandeysel

Nice one, glad you are up and running :wink:.

Blacky :smiley:

Hi. Love the BP but I I’m having an issue since updating a few months ago to 5.0 and now 5.2. Whn the motion sensor triggers the light the automation with the Sonoff MS it SOMETIMES, about 30% of the time, flasshes the ligt then off quickly, once. The it goes into wait period before being able to come back on. Ive taken the entitlity from Alexa and had a bit of a clean up ( removed from disabled autiomations etc ) but i t still doea it.

It was doing this when I just set up my own very simple (if triggered turn on light and off after 120 secs but that started doing it too. Then I moved to the version as of last April 23 ( cant remmber v no. ) but it’s started doing again ow since 5.0 and now 5.2.

Can some one help? Thanks

Oh and Happy Christmas. Just finished wrapingthe kids presents. Lol

( RasPi4, ZIGBEE * Core2023.12.3, Supervisor2023.12.0, Operating System11.2, Frontend20231208.2 )

NB. When I loo at the log, it just says the light was triggered by the sensor etc. No mention of going off by any means.

@Phix-it

Hi Paul

Sometimes when I update there are some things to do. I do document everything but you can miss it. You can go through the items to do in the FAQ but for this one I would recommend that you delete the automation (not the blueprint) and recreate a new automation. This way you will clean up everything that may be stopping it from running correctly.

Once you have done this test it and see if that fixes it. If not 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

alias: licht_wohnzimmer_automation
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.sensor_wohnzimmer_presence_sensor_1
    light_switch:
      entity_id: light.licht_gruppe_wz
    end_scenes:
      - scene.wohnzimmer_licht_aus
    time_delay: 2.5
    include_light_control:
      - use_brightness
      - use_colour_temperature
    light_brightness: 50
    light_colour_temperature: 2750
    include_ambient: ambient_enabled
    ambient_light_sensor: sensor.sensor_wohnzimmer_light_sensor_light_level
    include_night_lights: night_lights_enabled
    night_lights:
      entity_id:
        - light.wohnzimmer_lampe_1
        - light.wohnzimmer_lampe_2
    include_night_light_control:
      - use_brightness
      - use_colour_temperature
      - if_lights_are_on_adjust_when_crossing_over
    night_light_colour_temperature: 2750
    night_lights_before_time: "06:00:00"
    ambient_light_value: 63
    night_time_delay: 2.5
    night_lights_conditions:
      - time_enabled
    night_light_brightness: 15
    night_light_transition_on: 1.5
    night_light_transition_off: 2
    include_sun: sun_disabled
    ambient_light_options: ambient_light_option_enabled
    include_bypass:
      - bypass_enabled_stop
    motion_bypass_lights_off:
      - input_boolean.by_pass_kino
    motion_bypass_lights_on:
      - input_boolean.by_pass_kino
    motion_bypass_lights_stop:
      - input_boolean.by_pass_kino
    night_lights_after_time: "22:26:00"

Hey @Blacky
I wish you a Merry Christmas!!! Would you be so kind as to help me? I have activated the new option at the bottom of the Night Lightshow and thought that the lights would not go out during the transition. At the set time, I notice that the lights that are already switched on are set to the defined dimming level, but unfortunately they are switched off. This is very strange behaviour. I had added the lights as a light group, after it didn’t work, I added individual lights, same behaviour. Do you know why the transition doesn’t work and the lights are switched off?

Many thanks
Seger

@Blacky your blueprints are awesome. Question though… I know this were intended for triggering by binary sensors, but is there any way to trigger it with a stateless device (in my case, a zigbee button)? Nothing for it comes up in the entity list and I cannot quite figure out how to use it as part of your blueprint in addition to (or instead of) a binary sensory. If there is an easy way, I’d appreciate the help. I am not a super-advanced HA demigod so please keep the instructions simple :slight_smile:

Thanks for your help, after adding an entity on top of the scene it works fine now.
Maybe an enhancement for the future to make it work with scenes without adding an entity?

Hi @Blacky,
thank you very much for this blueprint! I’m new to HomeAssistant and I’m using your blueprint to automate bathroom lights using Shelly plus 1 mini and Aqara Motion P1 sensor and I have two unsolved question:

  1. When I turn on light using phisical switch attached to Shelly SW pin (edge switch) whitout firing Aqara motion sensor (phisical switch is placed outside the bathroom) then ligth doesn’t turn off after specified timeout. How can I solve?
  2. Bathroom has two light bulb (and two Shelly). I need to turn on first light/shelly only on motion and turn off all of two light/shelly after timeout. How can I do this?

Many tanks.
Danilo

@Blacky You know, I like your blueprints a lot, and your clear descriptions what it does.
I could re-import (pretty new feature of HA) your blueprints to upgrade to the most recent version - except this one (sensor light).
I am on version 5.2, and I got there using the “old” method to upgrade, means replacing the code via file editor and reload all automations.

How could I get “re-import” to work with this one?

@Seger85

And to you and your family.

The new selection “If lights are ON, adjust the lights when crossing over” will adjust your lights to the new setting if the lights are ON but if no motion is detected then the light will turn OFF after the set time delay. So it is still working off the trigger.

Blacky :smiley:

@jonathanbartlett

First welcome to the community :wave:

No the automation needs a state from ON to OFF and from OFF to ON. You can create a template binary sensor that will toggle when you press the button or you can create a by-pass and then use my other blueprint :nazar_amulet: Press Button - Turn ON & OFF Entities to toggle the by-pass ON and OFF with your zigbee button. Use option1 for the by-pass.

Blacky :smiley:

@mars2020

Nice one :+1:

Unfortunately this is how HA and scenes work so it will be up to HA. I have however taken this into account an made the blueprint work with this workaround.

Blacky :smiley:

1 Like

@danilomariotti

Welcome to the community :wave:

Your welcome.

If you turn the light on manually it will not trigger the automation. Currently we can’t use the light as a trigger as the automation will not work. But if you turn the light ON and then trigger the motion sensor the automation will run and turn you light OFF. You could get a Shelly 2PM and use one for the light but don’t connect it to a switch and the other contact connected to the switch to control the by-pass and use the by-pass auto OFF to do what your trying to do.

Add the first light in as an entity and then create a scene with the second light OFF and enter the scene “Scenes - Scripts To Turn OFF”.

Blacky :smiley:

@nicknol

Thanks for you kind words.

When we do this I haven’t added the URL in the code to the blueprint (maybe I should do this from now on). When we use the import blueprint HA adds this URL but if we update it the old method we then remove it. So if the file location is correct all we need to do is to use the import blueprint button again and it will be detected and update it. Then the URL will be added again automaticity by HA and you can use the new HA feature to update the blueprint.

It is in the FAQ and the link is below for a full step by step guide.

  • For HA version 2023.12.0 + Please follow these steps Click Here

Blacky :smiley:

Hi @Blacky ,
thank you very much for your reply.

If you turn the light on manually it will not trigger the automation. Currently we can’t use the light as a trigger as the automation will not work. But if you turn the light ON and then trigger the motion sensor the automation will run and turn you light OFF.

yes, this is what’s happening

You could get a Shelly 2PM and use one for the light but don’t connect it to a switch and the other contact connected to the switch to control the by-pass and use the by-pass auto OFF to do what your trying to do.

yes, it could be a good solution but the Shelly 2PM really doesn’t fit into my electric box :sweat_smile: , it’s really full! What about an external script or something else in HA (software switch? :thinking:) that detect Shelly switch-on and fire the automation? Sorry but I’m really new to HA! :innocent:

Add the first light in as an entity and then create a scene with the second light OFF and enter the scene “Scenes - Scripts To Turn OFF”.

Perfect! I wasn’t sure I colud put there a scene even if I used a switch in “Lights - Switches - Scenes - Scripts”

Danilo. :wave:

I don’t think the Shelly exposes a different switch into HA. It is just one switch. Example walk into the area and let the motion sensor turn the light on. Then look in HA and you will see the switch and the light is ON. Now if this happens when the motion sensor turn the light on it also turns the switch ON. You can’t have a trigger triggering another trigger to control the trigger. You can set up a independent switch to turn the light ON manually and use a time delay to turn it OFF. The by-pass will help you achieve this.

Blacky :smiley:

Hi,

I have just discovered the Blueprint. Are there plans to change the color temperature via the dynamic light option? I would like to have white light in the hallway during the day and increasingly yellow light in the evening when it gets darker.

And is there a way of switching the light to a different value after the motion detection has finished instead of switching it off? e.g. to 10% brightness, so that it stays on as light background lighting.

Thank you!

That’s how I understood it, but that’s exactly what’s not happening for me. The lights are set to the new values, the movement is still present, I have the FP2 sensors. But the lights go out. It is strange that the lights in the HA Ui are displayed as “On” with the new values. Could it be a bug? Or do I still not understand it?

Many thanks and best regards
Seger

Works like a charm! Many thanks for, again, your clear description and recipes.