Your automation looks good. What’s the value of input_number.badkamer_wait_time
? Perhaps you expect the value to be in seconds? It is actually the amount of wait time in minutes.
I’ll try to make that more clear in the docs.
Thank you for your reply.
In the helper I’ve set the slider to 5.
I’ve figured it out in the Yaml code that it’s in minutes but unfortunately also this didn’t work.
You can imagine I’m a bit lost😊
Nevertheless, I believe this blueprint has great potential for me.
Thanks again for your efforts
Xiaomi Gateway light does not turn on, most likely due to the fact that he also needs to specify the brightness and color of the lamp. How to do it?
data_template:
brightness_pct: 60
rgb_color: [169, 153, 255]
Working perfect for me. Thank you.
Blueprint is working great. The only issue I am having is more a logic one. I am using in the main area of the house. When we come down in the morning it is dark and the lights come on. But then they never go off as the room stays “active” regardless how bright is eventually gets. Could be for any part of the day if its rainy and dark then lights still are on but there would always be motion to keep the lights active.
Hi what value do you use for the aqara motion sensor? What zigbee do you use?. I’m using zigbee 2 mqtt with the 5 sec hack and even when lux is 66 and I set 200 as the cut off. The light won’t come on. Any advice would be appreciated
Hi @MrRodz, I ended up not using this template with the Aqara motion sensor because as far as I can tell, the sensor does not put out the lux level until the sensor is activated by motion. So you can’t use the lux level to decide if you’ll turn on the light since it doesn’t know the lux level until after the sensor sees motion. Does that make sense? I just used a sunset-sunrise timer to decide when it will turn on the light. I use the Conbee 2 and have been very satisfied.
Ahh ok thank you. Yeah that makes sense… sort of. I used to use domoticz and had a blocky set up to do a similar thing, well jut bring the light on if the lux was below 250. It worked in that instance. I’ll see if I can find out the difference. Sun position is not an option with the weather by me. Thanks for getting back to me.
Hi,
I have a problem, or a thinking error. I am trying to turn on a house light only when the outside brightness falls below a certain value. In principle, this should work. I have selected the appropriate outdoor sensor under (OPTIONAL) Illuminance sensor:. This is a PD03Z Zwave sensor. It delivers the value in the following form:
If I now set (OPTIONAL) Illuminance cutoff value: e.g. 250, the automation should work at less than 250Lux. Is this a thinking error? Unfortunately it does not work at all. That means as soon as I enter a value under (OPTIONAL) Illuminance cutoff value (no matter which one) the error occurs? Is it maybe the comma/dot in the return value of the sensor?
Like I posted multiple times in this thread, if you want/need to specify brightness or other attributes of a light, create a scene for that and use it in this blueprint.
This is by design. Originally the blueprint checked for illumination every time motion was detected. However, this created a bug where if the light itself was responsible for illuminating to above the illuminance threshold, the automation would quickly turn off the light again. To mitigate this, I have removed the illuminance check when the light was already on. Unfortunately this does not help your usecase.
In my house I leave lights in the ‘main area’s’ always on when I’m home. For area’s where I am only present for a shorter time I use this blueprint.
You probably are not using helper entities for the cutoff value.
Read the first post again to read how to set it up.
This blueprint is helpful! One thing I did have an issue with is if you use a ‘before’ and ‘after’ times that span midnight, it does not appear to work.
For example:
I have a nightlight that comes on if we get out of bed. If I set the after to 19:00 but the before is set to 07:00, the condition doesn’t seem to evaluate properly. Not sure if this is a limitation of the input_datetime
entities, but just FYI.
I’ll probably use lux instead for this application.
Thanks for sharing!
Hello and thank you for your work.
I noticed that if I insert as time: after 18:00 but before 06:00 (example) the automation does not work as there is the “change of day” and I think the code is partially wrong.
If I set the time within the limits of the day instead it works well.
That is weird.
I use an automation that also spans midnight, for turning on my hallway light next to my bedroom during thte night. It is working without issues.
My automation:
- alias: Turn on second floor hallway lights on motion detected during night
description: ''
use_blueprint:
path: homeassistant/motion_illuminance_activated_entity.yaml
input:
motion_sensor: group.motion_detectors_hallway_light
target_entity: scene.second_floor_hallway_night
illuminance_sensor: sensor.motion_sensor_2nd_floor_hallway_illuminance_lux
illuminance_cutoff: input_number.illumination_zolder_low_cutoff
no_motion_wait: input_number.second_floor_hallway_no_motion_turn_off_delay
time_limit_after: input_datetime.second_floor_hallway_lights_turn_on_before_limit
time_limit_before: input_datetime.second_floor_hallway_lights_turn_on_after_limit
target_off_entity: light.licht_gang_2e
The values for the input_datetimes are:
input_datetime.second_floor_hallway_lights_turn_on_before_limit: 22:00:00
input_datetime.second_floor_hallway_lights_turn_on_after_limit: 08:00:00
(The reason them seem backwards is because I use the same limits for the daytime automation)
Are you using the latest version of the blueprint? If you are not sure, please delete it and reimport it.
Hi,
I have been using this blueprint and on the most part it works great and is easy to setup.
What I am having problems with is i want the lights to delay turning off until the tv is off. I have tried setting the tv as a “Turn-off Blocking entity” but it seems to still turn the lights off when the tv is on.
I tried setting the “Turn-off entity” to be a script which itself turns the lights off only if the tv is off, but the script isnt called. it seems to send an off command to the “Target entity.” which is a separate script?
Im sure i am doing something wrong?
Thank you for answering.
I took your advice. Project deleted and re-imported.
Same problem.
- id: '1615487599067'
alias: Motion Accendi Luce Cortesia
description: ''
use_blueprint:
path: freakshock88/motion_illuminance_activated_entity.yaml
input:
motion_sensor: binary_sensor.motion_lavanderia
target_entity: switch.power_presa_luce_notturna
illuminance_sensor: sensor.motion_luminosita_lavanderia
illuminance_cutoff: input_number.illuminazione_lucenotte
time_limit_after: input_datetime.accendi_dopo_lucenotte
time_limit_before: input_datetime.accendi_prima_lucenotte
no_motion_wait: input_number.no_motion_lucenotte
The values for the input_datetimes are:
input_datetime.accendi_dopo_lucenotte: 19:00:00
input_datetime.accendi_prima_lucenotte: 07:00:00
If I try with these values it works
input_datetime.accendi_dopo_lucenotte: 00:00:00
input_datetime.accendi_prima_lucenotte: 23:59:00
That´s a very important point, took me some time to track down the reason why my automation didn´t fire (had a hard coded value in the “(OPTIONAL) Illuminance cutoff value”).
As I never handled helper entities before:
how to permanently store values in helper entities? Are they reboot resistent once set?
Update: found it in the docs, should be safe to survive reboots according to Input Select - Home Assistant.
New issue: light does not get turned off after motion sensor detects no motion anymore.
Whats wrong?
alias: Light ON_Room
description: ''
use_blueprint:
path: freakshock88/motion_illuminance_activated_entity.yaml
input:
motion_sensor: binary_sensor.motion_room
target_entity: light.bulb_room
illuminance_sensor: sensor.illuminance_sensor_room
illuminance_cutoff: input_number.illuminance_minimum_room
Answered that one by myself too: There´s no auto off when there´s no helper entity for the (OPTIONAL) Turn off wait time (minutes)
.
So lessons learned:
- This blueprint exactly does what it promises in its name: turn on something. Turning off and other stuff is completely optional and not working by default. Wrong expectations on my side
- Read the whole blueprint documentation (first post and blueprint texts in HA). Without helper entities you won´t get far beyond the initial use-case (turning things on based on motion). Using helper entities is a bit overkill where hard coded values would be enough too.
- Helper entity for
(OPTIONAL) Turn off wait time (minutes)
can have value 0 which means light will be turned off immediately when motion sensor detects no movement anymore.
Feature request @freakshock: accept seconds instead of minutes for the (OPTIONAL) Turn off wait time (minutes)
entity. That would allow a better timing.
i have a problem with automation: i set a Turn off wait time of 1 minute but the automation activate the output only during the on state of trigger