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

@meiser

No, there is no option for this. You will have to do that in a template binary sensor. This templae will have to look at your ceiling light and have a delay OFF. You then use this template in the bypass rather than your ceiling light.

Something like this

template:
  - binary_sensor:
      - name: "Ceiling Light Delayed"
        state: >
          {{ is_state('light.ceiling_light', 'on') }}
        delay_off:
          seconds: 5

Blacky :grinning:

Here is my vision. 3 sensors.

  1. Door Sensor (door from inside house into garage)
  2. Camera Person Detection
  3. Garage Door Open/Closed Helper (This uses the garage door cover sensor Open/Closed. I want this to adjust so that after 5 minutes its no longer triggered.)

The reason I want the no longer triggered so that I can just use person detection because some times I want the garage door open but I don’t need the lights to remain off if I’m not in there. Or maybe i need to setup a sensor group or whatever you’ve talked about. but regardless I gotta figure out how to trigger that helper to change after 5mins. Really appreciate your help and everything you’ve done.

Hello,

I’m experiencing an issue with my automation. The lights turn on when motion is detected and turn off after one minute of no motion, which works as expected. However, at the moment they turn off, they immediately switch back on again.

It almost looks like the turn-off and turn-on happen at the same time. After that, the automation remains in the “still running” state for about 20 minutes, even though there is no motion detected. I eventually have to manually stop the automation and turn off the lights myself.

Could this be related to dynamic lighting? Is it possible that when the timer finishes and the lights turn off, a dynamic lighting update runs at the same time and causes them to turn back on?

Would using the “dynamic toggle helper” help prevent this behavior?

Thanks in advance for any guidance.
My automation config:
alias: first_floor_hallway_motion
description: “”
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.first_floor_hallway_motion_occupancy
light_switch:
entity_id: light.first_floor_hallway_lights
time_delay: 0.5
include_dynamic_lighting: enable_time_controled_colour_brightness
dynamic_lighting_max_lux: 40
dynamic_lighting_max_brightness: 80
dynamic_lighting_min_brightness: 60
dynamic_lighting_max_colour_temp: 2800
dynamic_lighting_min_colour_temp: 2500
dynamic_lighting_time_end_evening: “21:00:00”
include_ambient: ambient_enabled
ambient_light_sensor: sensor.first_floor_hallway_ceilsense_motion_bh1750_illuminance
ambient_light_options: ambient_light_option_enabled
ambient_light_value: 15
ambient_light_high_value: 40
dynamic_lighting_min_lux: 15
include_night_lights: night_lights_enabled
night_lights_conditions:
- time_enabled
night_lights_after_time: “21:00:00”
night_lights_before_time: “07:00:00”
night_lights:
entity_id: light.first_floor_hallway_lights
night_time_delay: 2
include_night_light_control:
- use_brightness
night_light_brightness: 30
include_night_light_colour_control: use_colour_temperature
night_light_colour_temperature: 2500
dynamic_lighting_heartbeat: 10

My trace:

@Blacky, is there a chance to add this to the blueprint?

Adding helper solved this problem! Thank you for pointing this out.

1 Like

@killahawk0234

Open is ON in home assistant, so change your trigger to state.

When opened it will turn ON and then off in 5 min. If you close the door within the 5 min it will still need to time out.

template:
  - trigger:
      - trigger: state
        entity_id: cover.door_1
        to: "on"
    binary_sensor:
      - name: "Garage Door Auto Off"
        device_class: garage_door
        icon: mdi:garage-open-variant
        auto_off: 
          minutes: 5
        state: "true"

If you would like it to go OFF when you close the door but if the door is open it will go ON for only 5 min.

template:
  - trigger:
      - trigger: state
        entity_id: cover.door_1
        to: "on"
        id: "t1"
      - trigger: state
        entity_id: cover.door_1
        to: "off"
    binary_sensor:
      - name: "Garage Door Auto Off"
        device_class: garage_door
        icon: mdi:garage-open-variant
        auto_off: 
          minutes: 5
        state: >
          {% if trigger.id == 't1' %}
            on
          {% else %}
            off
          {% endif %}

Blacky :grinning:

@poupaerta

In Night Light Control could you please select If lights are ON, adjust the lights when crossing over and test it please.

Blacky :grinning:

@meiser

I try never to say never, I will put it on the list of suggestions. In the meantime creating the template would be the fastest way to achieve what your after.

Blacky :grinning:

Hello, i want to let the light on, wenn my pc is on.
So i have a devite tracker for my pc, present and absent.
In the option
Bypass Switch - Keep the Lights Current State i put the device tracker from my pc in.
But when my pc is present, the light will noch stay on.
What make i wrong?
THX

@lucascoco

The state must be ON or OFF not present and absent. You could create a template binary sensor so when your PC is present it will be on. You have to check the state of the PC in developer tools and match it exactly as it may not be present it may be home. Once you have this template binary sensor you would use this.

{{ is_state('device_tracker.your_pc', 'present') }}

Blacky :grinning:

1 Like

I have 4 copies of the blueprint running … It looks like with v8.5 they’re all showing “Unknown entity selected” under the Scenes & Scripts - Toggle Helper". I don’t use the helper nor any scripts/scenes in home assistant.

The good news is that 3 of the automations are still working – however the one that I use the most in my office has stopped turning on/off the office light. Trace shows that it is failing to reach the light but I can turn it on/off with no issue - name has not changed.

I’m upgrading to the latest version of HASS and HA I’ll update this post if it fixes anything.

Edit: With HA/HASS upgrade the office automation fixed itself.
Edit2: The “Unknown entity” has been reported to HomeAssistant

We have reported this to Home Assistant and looks like they may be looking at fixing it :crossed_fingers:. Thanks to @karwosts and @wendevlin

EDIT:

Looks like this has now been resolve and will probably be fixed in the next release.

Blacky :grinning:

1 Like

Slight modification. After some trial and error I got it working using the following code. Thank you very much for you help!

template:
  - trigger:
      - trigger: state
        entity_id: cover.door_1
        to: "open"
        id: "t1"
      - trigger: state
        entity_id: cover.door_1
        to: "closed"
    binary_sensor:
      - name: "Garage Door Auto Off"
        device_class: garage_door
        icon: mdi:garage-open-variant
        auto_off: 
          minutes: 5
        state: >
          {% if trigger.id == 't1' %}
            on
          {% else %}
            off
          {% endif %}
1 Like

Am I right that the latest combo of Hass and the Blueprint 8.5 the restart protection doesn’t work? SO if a light is activated, then a restart, the light will stay on forever? Sure it used to pick up and still shut off these lights, will add the separate blueprint as a back up for auto lights off.

Hey @Blacky thank you for your answer to my question about transitions.

I would like to ask if you’re planning a specific trigger about doors. That’s my scenario:

  • I have a bulb in my room (or even more relevant, outdoor)
  • I have a sensor in that area that works as a trigger
  • In order to make the light more responsive, I want to use a door sensor as a trigger (imagine I’m going outdoor in the night, and I need to walk out in the dark and wait for the light)
  • I don’t want my open door to keep the light on

I guess I could template a sensor that stays on for a given time after the door has been open, and then goes off, but that’s a common scenario for me (and perhaps others will find it handy) and I would like to avoid to template a dozen of sensors to maintain

1 Like

I would like to use a presence sensor as a “Bypass switch”, i have a specific need, i have a “guest bedroom” in the middle of a multi generation house, there are 4 doors leading in that room.

I would like the light to open when any of the 4 doors is opened BUT only if the “presence sensor” indicates that the room is empty.

I want to make sure that if anyone opens any of the doors and someone is sleeping in the room the light don’t turn on.

Would anyone have an idea if the blueprint have anyway to handle this ? (If the only way is to have a helper device, I would keep my actual 6 automations, I am in the process of streamlining all my automations)

thanks

@fardavide91

Yeah I get it but please understand that this blueprint is 10034 lines and adding this one option will be very complex. It can be better / cleaner to develop a trigger that suits you needs and then group the triggers together using the template you suggested.

Here is a link that I showed someone else how to create this template click here. It was for something else they wanted to do but would be the same template you would need. The second example may be the one your after.

Blacky :grinning:

@richsimpson

Not that I am aware of.

Blacky :grinning:

@goldriver

You would need to create a template binary sensor that will only turn ON when a door is opened and no presence is detected. You will then need to resolve the rest of the logic and what happens to turn it OFF… or you could just keep your 6 automation if it is working already.

Blacky :grinning:

@Blacky hi, awesome work! Is it possible to configure sensor light so it works like:
main light from sunset to 9pm;
night light from 9pm to 6am BUT also night glow is active from 9pm to midnight
?