Turn on light, switch, scene, script or group based on motion, illuminance, sun (+ more conditions)

I set up my entity through the helper.

Qnd here is how they look like

has_date: false
has_time: true
editable: true
hour: 21
minute: 35
second: 0
timestamp: 77700
friendly_name: Automation Value - Time Limit - After

That helper configuration loods good. Do you get any errors in the logs when the automation runs with the time limit enabled? Please post the log here.

A restart of HA solved it

But question,

Can i activate before and after in the same automation

Yes you can use both before and after time limits at the same time.

Amazing blueprint.

Is it possible to have this blueprint run at certain dates of the week as a condition also?

Hey guys, I have big issues getting the time-based control working. I think I did everything as it is recommended but still I can’t get it working.



The variable for the wait_time seems to work fine. As soon as I set the “only-run-after” it just ignores my automation and never triggers. I set it to only run after 23:15 and it is 23:24 now, which means it should work. Also the time in my HA is correct.
grafik

Please help me as I already wasted many hours trying to fix it.

UPDATE:
When I configure it like this my automation triggers,even if it should not.

Automation will only run when time is earlier than this input_datetime value.
It is set to 23:15 and it is 23:28 now, which means it should NOT trigger. Do I get something wrong?

@ freakshock
Hello, I am a complete beginner with Home Assistant. For about 8 years I have been working with Pimatic and on the basis of it I have been able to provide quite a bit for our SmartHome. Unfortunately, pimatic is now discontinuing the service, the support is unfortunately for some time almost zero. Unfortunately, I also have no programming knowledge.
Anyway, I have now landed with Home Assistant.
To somehow get going I loaded your Blueprint. I have a lamp, a brightness sensor and a Pir integrated. Works so far already times.
Now my question: is it possible that I enter values for the brightness sensor and switching time of the lamp? And where can I enter these values?
So in which file and at what point would I have to make changes?

Translated with DeepL Translate: The world's most accurate translator (free version)

In the meantime I found out that I have to generate helpers to do something like this. Do I have to make new helpers for each new rule?

First I love your automation I have this for every room, and floor. It would be even better if there was a way could you add the light color, brightness, and delay in your blueprint.

I have tried to see what the problem is here but I cannot reproduce it on my system. I would expect indeed the system time to not be evaluated correcty is some way… I have used the template editor in HA to check the values but in my case the condition is evaluated correctly when using the values you are using…

Helpers can be reused, for instance if you want to use the same brightness cutoff value for multiple automations. In that case use the blueprint to generate multiple automations, using the same helper.

Color and brightness is no issue, you can use a scene for that.
See this part of the FAQ.
A delay is not something I expect to be widely used so I don’t think I will add support for that.

Hi,

I’ve read an re-read the documentation but somehow I have trouble with scenes (lights not turning off). Essentially I try to turn on a scene (that works as expected) and then I use the light entity to turn the lights off.

Here’s the YAML of the configured blueprint. Any pointer in a direction? I’m afraid I’m missing sthg super obvious. :confused:

alias: Entrance movement
description: ""
use_blueprint:
  path: freakshock88/motion_illuminance_activated_entity.yaml
  input:
    motion_sensor: group.g_mvt_entrance #the sensor group :white_check_mark: works
    target_entity: scene.entrance_dimmed #the scene :white_check_mark: works
    illuminance_sensor: sensor.entrance_sensor_1_light_level #:white_check_mark: works
    illuminance_cutoff: input_number.illuminance_low_cutoff_value_entrance #a numeric value
    blocker_entity: input_boolean.nightmode_or_away #is off when I'm home
    no_motion_wait: input_number.max_wait_time #2.0 minutes
    target_off_entity: light.entrance #the entity to be turned off since scenes can't be turned off

Cheers

@freakshock

I recently started to get trouble with the blueprint
With the wait time
I trace it and found the attached error in the picture?
Can you help me resolve it?

Thanks in advance,
Ahmed

Do you have errors in your home assistant log? Did you check the automation debugger?

I think you have an outdated version of the blueprint. Can you try reinstalling it and trying again?

Hi,

Thanks for your heads up. I didn’t find anything revealing in the logs or the traces (i find the traces very cryptic for my level of knowledge). :confused:

But I found a workaround for my case. My lights are all Philips Hue and they are set to turn on/off the last state/scene. So I select a scene from the Hue app, and when the automation triggers the lights in HA, then the last scene gets turned on/off. It’ll do for my use case.

Please add the conditions for sunset and sunrise

1 Like

Hi! Great blueprint thanks for making this. I’m probably missing something simple as I’m still new to HA, but how can I set this up where if I turn the light switch on manually it will block the turn off automation? I can’t think of how to automate turning on an input Boolean blocker from the light switch turn on without the boolean also turning on when the automation turns the switch on

That is indeed not very easy to solve.
This thread might give you some ideas.