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

Hi @Blacky
Tk again for your anwser and your support!

This is the code :

alias: Allume/Éteint entrĂ©e mouvements
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.presence_sensor_fp2_6144_presence_sensor_2
    light_switch:
      entity_id: light.spots_entree
    time_delay: 0.5
    ambient_light_sensor: sensor.presence_sensor_fp2_6144_light_sensor_light_level
    include_sun: sun_enabled
    include_ambient: ambient_enabled
    ambient_light_value: 50
    ambient_light_options: ambient_light_option_disabled
    light_transition_off: 0

Hope that can help you!

Dear Friends,
I try to search everything in here but i cant see any information about bypassing by button. I am not using any switches, I have buttons on my environment. Any suggestion will be appreciated. I am using sonoff motion sensor, sonoff button, and hue lamp.

Thanks in advance.

@Drealine

Thanks for providing your YAML of your automation.

I have tested it here again at sunrise and sun set using the “Sun” and “Ambient Light Sensor”. It worked perfectly, can’t fault it :smiley: :+1:

This is how it is designed to work;

You have 2 global conditions Sun & Ambient

  • Sunset - When Motion Trigger is ON

    • If your ambient is below your set point of 50 and the sun crosses over below your sun elevation then the light will turn ON.
    • If your sun is below your sun elevation and the ambient crosses over below your set point of 50 then the light will turn ON.

    If the motion trigger is OFF then at sunset, nothing will happen and the lights will be OFF and stay OFF.

  • Sunrise - When Motion Trigger is ON

    • If your ambient is below your set point of 50 and the sun crosses over above your sun elevation then the light will turn OFF.
    • If your sun is below your sun elevation and the ambient crosses over above your set point of 50 then the light will turn OFF.

    If the motion trigger is OFF then at sunrise, nothing will happen and the lights will be OFF (or already timing out to OFF) and stay OFF.

Please check again as it will probably be at your end.

Blacky :smiley:

Tk again @Blacky
Found the problem. My FP2 sensor still presence on my outdoor when go out and when sun goes down, the automation turn on. So it’s a stupid false detection.

Sorry for the inconvience. And happy to see that you’re automation work very well, fast & with no flourish!

@MDemirkiran

Hi Murat, firstly welcome to the community :+1:

This blueprint by-pass requires a state change from ON to OFF. If you have buttons then first you will need to create a by-pass using a helper. On how to do this see our FAQ Click Here.

Once you have created the by-pass helper you will need to add it into the blueprint.

Then you can install my :nazar_amulet: Push Button Relay - Contactor blueprint. You will then use this blueprint so you can use your button to toggle the by-pass switch :wink:. It is easy and simple with this blueprint and I am sure you will get more use out of it with other things you will need to control.

Hope this helps you

Blacky :smiley:

1 Like

No problem, glad you found the problem :+1:

Enjoy

Blacky :smiley:

FAQ - Special Calendar Event Lighting

Through out the year we all like to have lights for special event like Halloween, Christmas, New Year, Sporting Days, Easter, Parties, etc. This is all possible now using this blueprint :bulb: Sensor Light along side with my new blueprint :calendar: Calendar Notifications & Actions. This was one of the main reasons I created “Calendar Notifications & Actions” with all the upgrade of by-passes in the sensor light blueprint.

Now you can create calendar events to automaticity turn ON and OFF by-passes so you can switch your lighting automations to accommodate for your special events lighting needs.

How To Set Up - Special Calendar Event Lighting

Because we are getting close to Halloween of the time of this post we will use this event as an example on how you can achieve this. But you can replace Halloween lights with any other special event you may have.

  1. First we need to create a by-passes and a template binary sensor trigger. You can call them anything you like. See our FAQ: Click Here on how to create a helper by-pass.

    • Halloween By-pass - This will be used in my normal everyday lighting automations and will be linked to the binary template sensor so they will toggle together.

    • Halloween Trigger (template binary sensor trigger) - This will be used as the trigger in my Halloween light automations.

      Create a template - binary sensor helper. Settings / Devices & services / helpers tab at top / create helper.

      9

      In the state you would input your by-pass entity in.

      {{ is_state('input_boolean.your_by_pass_here', 'on') }}
      

    • Now the “Halloween By-pass” will toggle the “Halloween Trigger” ON and OFF at the same time.

      12

      13

  2. Create all the automations using this :bulb: Sensor Light blueprint and adding your “Halloween Trigger” in. You can have more than one automation for your “Halloween Lights” as they all will be activated and deactivated all at the same time. Set the time delay to “0”.

  3. Then in all your normal automations that you would like to disable when Halloween lights are ON enter in your “Halloween By-pass” as shown above in step 1.

  4. Now we need to create the calendar event. Enter in all your Halloween calendar events for when you would like the Halloween lights ON. Example of one day below but you could have 2 weeks of Halloween lights so you would enter in an event for each day you would like the Halloween lights ON. Notice in the description we have used a key word “@halloweenlights”. More information on this is in the :calendar: Calendar Notifications & Actions post.

  5. Now using the :calendar: Calendar Notifications & Actions blueprint we need to create an automation. Enter in the trigger in for the calendar event. You can see the keyword is entered in.

  6. Now we need to enable the start auto action and add an action. In the action we will call service / and turn ON the “Halloween By-pass”.

    Now when the calendar start event fires it will disable your normal everyday lights turning them OFF and turning ON you Halloween Lights automations.

  7. At the end of the calendar event we need to reset your lights back to normal lights again. To do this we need to enable the end auto action and add an action. In the action we will call service / and turn OFF the “Halloween By-pass”.

    Now when the calendar end event fires it will disable your Halloween Lights automations and turn them OFF and turn ON you normal everyday lights. You are now back to normal.

Hope you like this new feature and create some nice Special Calendar Event Lighting.

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

1 Like

Hey there, sorry I am new to this blueprint thingy. I just press the button above and hit preview on the blueprint import. Then I’m getting the following error

Invalid blueprint: extra keys not allowed @ data['blueprint']['input']['ambient_light_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

Can you help me? What am I doing wrong?

Thanks in advance

@fragsalat

Looks like your are on a older version of Home Assistant. In the last update we removed the “DEPRECATED” code so the blueprint will continue to work into the future. Please update your HA and let us know how you go.

For interest what version of HA are you using?

Blacky :smiley:

Hi,
Just wondering if this excellent blueprint can be used in any shape or form to handle one or more normal dimmable Smart Switches, as well as a shelly dimmable 2.
In this case, the smart switches are having power to them, and the lamp is connected to the shelly.
I presume I need to create a helper group light, and put them all there?
I can turn the lights on or off fine, but the dimmable can only be done via shelly. When I press the smart switch dimmer then the HA light switch attached to this one shows the dimmer goes up or down, but it is not connected to the lamp.
I put this question also in the forum

Thanks in advance for any and all replies, and or hint/tips/solutions
Cheers

Dump me. I just relied on the updates section to show me when there is a new version out there.
After upgrading to latest HA version it works. Thx

@bthuree

Yes you just add in all your lights and “Use brightness” and set your brightness level. It must be a “light” entity for this to work. I use Shelly dimmers and they work perfectly. There is a flicker with the Shelly dimmers and I am waiting fro them to fix it and release a new dimmers as the current dimmers are out of date.

Blacky :smiley:

@fragsalat thanks for the update and letting us know. Glad you are up and running :+1:

Enjoy the blueprint

Blacky :smiley:

1 Like

Finally got round to it, works perfectly so thankyou.

Think I need to sort an integration that can trigger lights based on weather and sun level as sometimes it gets quite dim when the weather is bad. Not a fault of the integration by the way.

It’s a shame nobody makes a cheap ZigBee battery ambient light sensor!

Thanks Blacky,
That gives me a lot of hope :slight_smile:

But I am stuck on the trigger question

  • Trigger Sensor - Binary Sensors - Schedule *

I have added my Moes Switch and Shelly to a group called StudyLight.

I also created a binary sensor as per below

  template:
  - binary_sensor:
    - name: test light binary sensor
      state: {{ states('light.testlight') }}

But when I add this binary sensor to my dashboard with an entity card, it never changes state. Always Off. Even if the testlight entity is displaying correctly the light state.

It do feel a bit overkill using this blueprint, when I only (at this stage) want to enable wall light switches, and the shelly dimmer, and hook them together so it is seamless whichever one of them you use to turn on/off the light, as well as dim the light.

@leejbarker82

Good news thanks for letting us know :+1:

You could just make another automation and use the time feature for daytime.

Blacky :smiley:

correct the binary sensor will do nothing
 not sure what your trying to do


The Shelly 2 dimmer will work with a light switch and you can turn the light ON and OFF. The automation will do this and take over control, so if your turn it ON manually and the automation gets triggered then it will run as per your settings and turn the lights OFF. You will have control of the dim level. If you wire everything up and normal and add the blueprint automation then it will work like this.

If you would like to manually control your lights, then you would need an independent switch connected to the by-pass and you would use “By-pass Switch - Turn lights ON”.

If you would like to PM me we can go through it.

Blacky :smiley:

The reason I tried to get a binary sensor is that the blueprint requires a binary sensor to start the light.

So no need to group the wall switches and the shelly with this blueprint?
And how about the Link the On/Off state of the Switch and Shelly?
Currently I do not have any binary sensors to activate the light.
I only have

  • 1-2 Smart Switch with build in dimmer. I will replace the normal wall light switches and dimmer with this one.
  • 1 Shelly dimmer 2, and this one I will put in the roof cavity.

Tried to use the By-Pass turn lights on, but it still required a binary sensor to activate the lights to start with.

o’h, and I’m located in Australia, which might explain why things are perhaps upside down for me


I’ve got a cheap Lux Sensor coming from Ali Express, it was only £10 so not holding too much hope,

failing that I’m going to try a automation based on the current weather,

and failing that, I’ll do a time-based automation!

1 Like

@bthuree

This blueprint is used when you have a binary sensor that triggers the automation. I am not sure why you are using it if you just have dimmer switches. You can use a schedule or a time of day helper that will trigger the automation and I have a few lights that do that, ON at sunset and OFF at 11:00 pm. If you would like information on this then Click Here. The most typical binary sensor that would be used as the trigger is a motion or presence binary sensor.

Blacky :smiley: