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

@voydz

Yep you are correct there is a bug in the bypass when using scripts and scenes. Sorry about that :pensive:… I will have to fix this ASAP.

Thanks for letting me know :+1: and keep an eye out for the next update.

Blacky :smiley:

@rananna

No problem, glad you are up and running.

Blacky :smiley:

You just rock. Thanks so much :slight_smile:

@voydz

This has been resolved, a new update is coming out now. Let us know if I got everything.

Again thanks for your help.

Blacky :smiley:

1 Like

New update 6.0

Your lighting experience, your way – take control and customize it to perfection! :bulb::sparkles:

Bugs Fixes :bug:

  • Fixed bugs in By-pass when using scenes or scripts.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

Thanks for all this, looks great. Haven’t made it work yet. Can the entity be a dimmer switch? If so, how is the light level set?

@skome

If you can use HA to adjust the brightness then you should be good to go.

Try it out and let me know how you go.

Blacky :smiley:

It’s probably me and my settings, and unfortunately I have to ask questions now.
Version 5.9.

I have the lights first half of the blueprint working fine for P1 Aqara Sensor detects motion, turn on light 100%.
Time mode, 6 PM to 9 PM. Adjusted to test.
Green entity bedroom bulb.
Works every night.

Trigger is Aqara P1 motion sensor.

That worked and still works if I change the times to test and turn off/disable night lights.

I also had nightlight working for one night.
That has stopped working.
Also time based. 9 PM to 6 AM
Green entity, same bedroom bulb.
Even if time is changed to now time and tested.

I’be used do not disturb as a night light entity state.

I think I used the same motion sensor as the toggle on night lights seemed to work for one night. So many changes and tests I don’t remember. Lol

Rearranging the times and toggling DND to test night. Nothing.

P1 is always detecting motion and occupancy, not using occupancy, only motion. They both clear also.

I’ve tried DND as the night toggle, battery charging, the same motion sensor etc. If I manually run the automation, you can see the bulb is at 20 percent, times out, goes out, but wont fire again if time is adjusted and saved…

I am getting an error occasionally which I’m too newb to ID. And may or may not even be associated. But only a couple of times. No clue.

:frowning: My apologies, I’m a newb to HA anything, but learning fast.

yes, this works in HA already as a scene triggered by the motion detector.
But with this blueprint I tried setting it with the motion detector as the trigger and the dimmer as the entity but nothing happens. But I don’t see where to tell it what the dimmer should do, what the brightness should be. I tried the Light Control options. What else should I try? TIA

Further testing today for night lights.
Set time and entity state on in night lights.

Used the same motion sensor occupancy as the turn on for night lights.

Same physical sensor as motion, which triggers lights at the top of the blueprint.

Maybe there be a trigger race, maybe not. I’ll know tonight.

And even further and upon reading. I think I accidently set the times correct once and then fiddled with them without reading. I set the times exactly as in the instructions. So testing tonight.:joy:

This is the correct place to set the brightness for the entity you add to “Lights - Switches - Scenes - Scripts *”

What sort of dimmer is it? How is it connected to HA? Does it have a dumb or smart bulb connected to it?

1 Like

You can’t adjust the brightness of a scene only a light entity. The brightness is set in the scene. Make sure it is a light entity see if that works.

If you still having problems 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:

Thanks its working now… !! :facepunch:

Hey @Blacky I did some testing. It seems to work fine now, thank you so much.

I have a additional question again, sorry. I tried to figure it out myself … but wow this blueprint is a beast. It is so massive I do not even know how you are able to maintain it. :smiley: (And I am not unfamiliar with yaml, ha automations and programming in general.)

The thing I noticed: I use the bypass ON to turn on the lights with a wallswitch (and auto OFF for bypass ON in your blueprint). I noticed that the light is turned off after set time delay even if motion is detected in between. Is that true?
Now I am thinking: Is it a better solution, if I built a template sensor triggering on a button press of the wallswitch to toggle to automation alongside the motion sensor.
Allthough I thought bypass ON/OFF and so on is the perfect “interface” to your blueprint if I want to an additional light switch. What do you think?

best regards

No problem at all.

This is the part that a lot of the community ask and I am not sure even if this is what you are asking but here goes.

The wall switch for the light cant be used as a bypass. See HA see it as one entity so when the light turns ON by the automation the bypass gets turned on like a millisecond after. So now the bypass starts and turns you light OFF. So when we use the bypass we cant reference the light or use the light switch. Even if you created a template sensor linked to your light as it will be the same. This is just an example. We could get a Shelly PM2 and use one relay for the light and one relay for the bypass. The bypass can work like a manual switch and you also have the option to use the auto turn OFF if it was forgotten to be turned OFF as we get so use to not manually turning ON and OFF lights when we have a smart home. Really one day we will not have any switches on the wall.

If I got it wrong just ask again.

Blacky :smiley:

Hey, thanks for clarification.

With wallswitch I meant a philips hue dimmer switch. The light always has power. So, to clear things out, what I am trying to achieve is something that is implemented in GitHub - Jason-Morcos/homebridge-magic-occupancy: Occupancy sensor linked to one or more switches with a built-in delay not-unoccupied delay for Homebridge

The question is, if I should avoid bypasses for my hue switch alltogether and and trigger a virtual occupancy sensor (the template sensor I mentioned) along with the motion sensor.

Thanks for your guidance :slight_smile:
best regards

@Blacky I’m seeing this in my logs

Logger: homeassistant.components.automation
Source: components/automation/__init__.py:1020
Integration: Automation (documentation, issues)
First occurred: 5 February 2024 at 20:55:22 (10 occurrences)
Last logged: 07:24:38

Error evaluating condition in 'Kitchen Motion Light': In 'condition' (item 1 of 6): In 'or' (item 14 of 22): In 'and' (item 3 of 3): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Hall Motion': In 'condition' (item 1 of 6): In 'or' (item 14 of 22): In 'and' (item 3 of 3): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Landing Motion': In 'condition' (item 1 of 6): In 'or' (item 14 of 22): In 'and' (item 3 of 3): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Back Garden Sensor Light': In 'condition' (item 1 of 6): In 'or' (item 14 of 22): In 'and' (item 3 of 3): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Front Garden Sensor Light': In 'condition' (item 1 of 6): In 'or' (item 14 of 22): In 'and' (item 3 of 3): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'

here’s my yaml code:

alias: Kitchen Motion Light
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.kitchen_motion_sensor_occupancy
    include_light_control: dont_use_brightness
    include_sun: sun_enabled
    time_delay: 1.5
    end_scenes:
      - scene.kitchen_motion_light_off
    include_night_lights: night_lights_disabled
    light_switch:
      entity_id: scene.kitchen_motion_light_on
    sun_elevation: 0
    light_transition_on: 0.5
    motion_bypass_lights_off: []
    motion_bypass_lights_on:
      - light.kitchen_lights
    include_bypass:
      - bypass_enabled_turn_on

I’m getting a similar set of errors:

Logger: homeassistant.components.automation
Source: components/automation/__init__.py:1020
Integration: Automation (documentation, issues)
First occurred: February 6, 2024 at 4:45:00 PM (8 occurrences)
Last logged: February 6, 2024 at 8:45:01 PM

Error evaluating condition in 'Light: Garage Dome Light ': In 'condition' (item 1 of 6): In 'or' (item 20 of 22): In 'and' (item 1 of 2): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Light: Entrance Morning & Day': In 'condition' (item 1 of 6): In 'or' (item 5 of 22): In 'and' (item 3 of 5): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Light: Entrance Morning & Day': In 'condition' (item 1 of 6): In 'or' (item 6 of 22): In 'and' (item 3 of 4): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Light: Office Lights Presence': In 'condition' (item 1 of 6): In 'or' (item 6 of 22): In 'and' (item 3 of 4): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'
Error evaluating condition in 'Light: Stairwell Lights': In 'condition' (item 1 of 6): In 'or' (item 6 of 22): In 'and' (item 3 of 4): In 'template' condition: AttributeError: 'list' object has no attribute 'lower'

@voydz

As long as the button and the light are 2 entities. Then yes is should work. What is the entity of your button and what is the entity of your light. Also when you press the button what is the state?

Blacky :smiley: