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

@QuiBono

Adding a custom action sounds simple, but getting the logic right can be tricky. One approach you could try is using the Scenes & Scripts - Toggle Helper. Then, create another automation that turns the IKEA bulbs OFF when this helper changes from ON to OFF. This could serve as a secondary signal to turn them OFF reliably.

However, the issue seems to be with the IKEA bulbs themselves. I’d recommend reaching out to IKEA and explaining that you’re using Home Assistant to control the lights, along with a description of the issue. Hopefully, they can help resolve the communication error.

Blacky :smiley:

@DuckDuck25

Please make sure night lights are enabled for them to work. See below.

Blacky :smiley:

Came here to say thanks for this blueprint - it works very nicely, and this comment answered the question that I was wondering about - being able to start the automation at sunset, and then stop it at midnight. Used this template with just the evening part, and it works lovely! Thanks!

@CarrieSweetpea

Hi Caroline, thanks for your kind words and it is nice to see you spent the time to read the comments. It is really nice to get these ones :smiling_face_with_three_hearts:

Enjoy

Blacky :smiley:

1 Like

New update 7.9

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

:bug: Bug Fixes

Bypass

  • Turn OFF action: When using Night Glow, the bypass would not turn off the Glow lights when using option 2.

  • Crossover when bypass is ON: Addressed multiple scenarios where, if the bypass was turned ON and a crossover occurred, the correct action would now be performed when all bypasses were turned OFF.

Global Conditions

  • Fixed an issue where Night Glow lights would not turn OFF based on sun, ambient, or time conditions.

:toolbox: Maintenance

  • Some code clean up in Device Tracker.

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:

1 Like

Great blueprint,

Im using this in the bedroom with a motion sensor based on time.
Night and daytimes are set for low and full light.

But how do i make a difference for weekend days?

@sebastiaan72

You will have to use the time condition and have 2 automations. One for during the week and one for the weekend.

Blacky :smiley:

1 Like

Hi Blacky,
vielen Dank fĂŒr deine RĂŒckmeldung.
Ich habe alles eingebaut, wie du es beschrieben hast. Leider geht das Licht um 21 Uhr nicht aus.
Meine ursprĂŒngliche Konfig hatte nur den Bewegungsmelder und die Bedingung Sun, weil der Bewegungsmelder keinen Hell/Dunkel Unterschied macht.
In deinem Template wird ebenfalls Sun verwendet, allerdings ohne Unterschied zwischen Auf- und Untergang. Eventuell stören sich die beiden?
GrĂŒĂŸe Vorhand

Ich möchte mich da nicht einmischen, aber bevor es vielleicht ein Mod erwĂ€hnt: Dies ist ein englischsprachiges Forum. Auch wenn Blacky möglicherweise Deutsch spricht oder versteht, wĂ€re es fair gegenĂŒber den anderen Usern, die Frage auf Englisch zu stellen. So können dir vielleicht auch mehr Leute helfen.

I don’t want to interfere, but before a mod might mention it: This is an English-speaking forum. Even if Blacky might understand or speak German, it would be fair to the other users to ask the question in English. That way, more people might be able to help you.

Is anyone else seeing weird behavior with 7.9 that wasn’t present in 7.8? Late last night after the upgrade, and this morning, many of my lights are acting super weird. Lights not triggering on, lights staying on when they should turn off, etc. This morning I’m going to try a HA reboot to see if that fixes the weird issues.

@Vorhand

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.

In German

Könnten Sie uns bitte Ihr YAML der Automatisierung zur VerfĂŒgung stellen? Bei diesem YAML-Code handelt es sich um die Einstellungen, die Sie in der Automatisierung ausgewĂ€hlt haben, damit ich Ihnen helfen kann. Gehen Sie dazu in Ihre Automatisierung, oben rechts 3 Punkte, Bearbeiten Sie in YAML, kopieren Sie den gesamten Code, kehren Sie zum Forum zurĂŒck und klicken Sie in Ihrer Antwort in der oberen Symbolleiste auf „</>“ und fĂŒgen Sie dort den Code ein.

Blacky :smiley:

Hi !

I can not configure the illuminance sensor from a Aquara motion sensor. It is not available in the dropdown.

@ciddi89

Hi Christian,

Sorry
 this is probably my fault. @Vorhand originally posted in German, then re-posted in English, and I mentioned that I was okay with either. When I respond, I usually translate the question and then answer it in English.

I’ve noticed that some community members try their best to write in English, but it’s clear it’s not their first language. Since Home Assistant is used worldwide, I understand how challenging it can be for non-native speakers. Unfortunately, some people even give up because of the language barrier.

It would be great if the forum editor could automatically translate posts into English while allowing users to have their browser translate them back into their preferred language. That way, everyone could participate more easily. Maybe this is something HA could consider for the future.

For those who prefer to browse the forum in a different language to English, you can set up automatic translation in your browser. If you’re using Firefox, you can translate pages easily by:

  1. Clicking the hamburger icon in the top right just below the X and selecting translate page

  2. Then just select your language.

    158

Most browser will have this type of option. Hope this helps, and thanks for your understanding!

Blacky :smiley:

@DuckDuck25

It shouldn’t, unless you’re using the bypass. Please keep us updated either way, and if you notice anything, I’d be keen to resolve it ASAP.

Blacky :smiley:

@alexebner

If you can’t select it, try copying and pasting the entity ID into the input. Make sure you’re selecting the correct entity and that its state is a numeric value.

Blacky :smiley:

@Blacky

Yes, all good. I didn’t mean any offense, just a hint. It’s not a problem for me either. Especially because I’m German anyway. But I and other users also have to try to write everything in understandable English. Sometimes it’s not easy. And if I don’t know something, I use DeepL. This is also very helpful. :slight_smile:

I think a translation function in the forum would be great, but there’s a risk that everyone would then write in their native language and the forum would become very confusing. :see_no_evil: But that’s off-topic now.

Anyway, thanks for your great blueprints! :slight_smile:

1 Like

First, I updated to 7.9 but the problem persist, it’s so strange, I checked the automation setting many times, I don’t know why it turn off LED Scrivania

1 I tried specifically to have it on before
2 it is included because when I enter the room it turns on, and off when I exit, so either home scene and off scene are working properly
3 it’s not too clear, if led scrivania is on during night lights it transition to a different brightness, and ambient lights turns to a different scene, when no motion is detected night glow starts, led scrivania turns off and ambient light scene turn on, even if there is nothing on before midnight, thant works as expected

The only thing that doesn’t work is led scrivania returning from light addon (tv/pc movie), it turns on and immediately after off

When I disable sensor light led scrivania works as expected, it turns on after watching, so I know is something with sensor light

This is my latest config:

id: '1737988951608'
alias: Lights
description: ''
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.ep_lite_5cb900_occupancy
    light_switch:
      entity_id:
        - scene.home
        - scene.camera_ambient_lights_home
    end_scenes:
      - scene.tutto_spento_camera
    time_delay: 1
    include_night_glow: night_glow_enabled
    night_glow_lights:
      entity_id:
        - scene.camera_night_glow
    motion_bypass_lights_stop:
      - input_boolean.disable_sensor_tv_lights
      - input_boolean.disable_sensor_pc_lights
    include_bypass:
      - bypass_enabled_stop
    include_light_control:
      - use_transition
    include_dynamic_lighting: disable_dynamic_lighting
    include_device_tracker: zone_enabled
    zone: zone.home
    boolean_scenes_scripts: input_boolean.lights_helper
    include_night_lights: night_lights_enabled
    night_lights_conditions:
      - time_enabled
    night_lights_before_time: '08:00:00'
    night_lights:
      entity_id:
        - light.led_scrivania
        - scene.camera_night_glow
    night_time_delay: 1
    include_night_light_control:
      - use_brightness
      - use_transition
      - if_lights_are_on_adjust_when_crossing_over
    night_light_brightness: 20
    include_night_light_colour_control: use_rgb_colour
    night_light_colour_temperature: 3000
    night_light_rgb_colour:
      - 255
      - 186
      - 137
    night_boolean_scenes_scripts: input_boolean.lights_ambient_lights_helper
    light_transition_on: 1

This is what appens:


This is the full trace:

Is there any way for this blueprint to take into account two different sensors like a PIR and a MMW? Im basically wanting to create a light automation based on occupancy in a room that is determined by both a PIR/MMW as well as timeout (i asked a question about this here). Im just not sure how i can get a single ON/OFF from that to pass onto this blueprint. The question im asking is does this blueprint support such complexity out of the box?

Hi, here is the YAML Code:

alias: Sensor Außenlicht
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.gruppeaussenlicht
    light_switch:
      entity_id: switch.zx_5209_steckdose_1
    include_light_control: []
    include_sun: sun_enabled
    include_night_lights: night_lights_disabled
    night_lights_conditions:
      - sun_enabled
      - time_enabled
    night_lights_before_time: "21:00:00"
    night_lights_after_time: "16:00:00"
    sun_elevation: -1
    include_time: time_disabled
    after_time: "21:00:00"
    before_time: "08:00:00"
    night_lights_entity_state: []
    night_boolean_scenes_scripts: input_boolean.dauer
    sun_elevation_rising: -3

LG Vorhand

@PilaScat

Sorry I cant see your trace and I have no idea what is in your scenes. It will be there somewhere.

Blacky :smiley: