Easiest way: Install this blueprint according to the manual, restart HA and then create the following automation:
- id: '1668437140895'
alias: 0 - Lamp Hal onder (motion)
description: 'Automatisch schakelen licht in de hal obv voordeur detectie'
use_blueprint:
path: networkingcat/yet_another_motion_automation.yaml
input:
no_motion_wait: 120
# This means: 120s after the sensors internal blocking mechanism, perhaps as long as 90s?
# If you want 2 minutes after you left the room, lower to 30.
motion_entity: binary_sensor.motion_voordeur_motion_detection
# Check for correct sensor name, doesn't it end in "_occupancy" ?
light_target:
entity_id:
- light.hal_onder
Automation reload() et voila, it should work.
(since you donât use a blocker bool, no need to add the extra automation is wrote above)
Probably it fails because of the â_occupancyâ, remove all lines with # and try again. Or it cannot find the correct blueprint? Did you install the blueprint in the correct way, is it located in home-assistant config dir?
Otherwise you could install it using the HA mode: Create a link â My Home Assistant
Check afterwards if it is installed in folder home-assistant\config\blueprints\automation\networkingcat\yet_another_motion_automation.yaml
restart HA, reload the page in your browser (CTRL-F5)
Then go to automations, click â+ create automationsâ, choose the correct blueprint and fill in only the first three fields:
motion sensor entity (choose correct entity, iets met voordeur en occupancy, icon with moving person)
under light, click choose entity and choose the light for the hallway
wait time 120 (see remark above)
Click save and give it a name, reload automations (developer tools â click automations, wait for green mark) Now it should workâŚ
Hey, thanks for this blueprint, I have moded it (actually mostly copy/pasted from another blueprint) to only switch on the light while a light sensor reports the lux level below a threshold.
I could share my fork, but dont know if its âallowedâ to just hijack the thread?
Basically have added variables and a condition for the âonâ state trigger.
Also saw someone mentioning that lights arent switching off after sunset, shouldnt the elevation check also move to only check inside the âonâ trigger conditions to fix this?
Iâve been trying a simple fix for the issue whereby the blocker changes state during the wait time (ending up with the light staying on in my case and never being switched off).
The code is as simple as: - "{{ trigger.to_state.state == 'off' }}" so that the action can still trigger (ie bypass the blocker) if the trigger state was to âoffâ so that any âoffâ actions can happen
I use HiLook cameras for motion detection. They use pixel based motion detection. When someone walks into a room the camera detects motion and turns on the lights. Then I use a 2 minute timer to turn the lights off if there is not motion. Problem is, the camera detects the light turning off as motion and turns the light back on. Any idea how to stop this?
Hi, I have the same Problem. I use a helper switch as blocker. It goes on or off in dependece of the lux within the room. But if the blocker state is changed while the light is on, it doesnât go out anymore. But as I am totally new to Home Assistant (or Linux or coding) I do not understand where to fill in the additional condition. My YAML look this way in the moment:
Hi just found this awesome blueprint. im trying to use ambiend scene for a light but it doesnât start by itself on set time.- only if a motion is triggered and then it returns to ambient. also when ambient time period is up nothing happens until motion is triggered again. or am i missing something here?
Someone may have done this, but I changed the time inputs for schedule inputs. This way you can have the same schedules in multiple rooms, see them on a dashboard and adjust them, and also have different time settings for days of the week w/out using multiple automations.
Fork here: Homeassistant blueprint for motion-activated light scene ¡ GitHub
Why do i have to schoose a light/room at the top in the blueprint?? I want the scenes to turn on! I must select a rooms for it to work.
Now i running the default action that is âLightââŚ
When I use the no motion blocker to prevent the lights from switching off, the automation still triggers when motion is detected. This is on purpose, I know. However, in my configuration it is a problem in case the lights are dimmed during the evening or night, and you want brighter light. When somebody hits the dimmer to activate a bright scene or just increases the brightness as soon as motion is detected the light switches to the scene defined in my YAMA automation. When I use the same blocket in âno motionâ and âautomation blockerâ, the light will not switch off when nobody hits the dimmer again to deactivate the âmanual modeâ.
I have the problem that the automation works great as soon as it is dark. But as soon as the brightness increases while the light is on, e.g. light from outside, my lamp is no longer switched off and stays on forever. does anyone have any ideas?
Do you maybe have an input Boolean which changes the status of the automation or no motion blocker? I had this and as soon as I changed it, the lights switched off again.
I noticed two issues with this otherwise great blueprint:
The light will not turn off, if the sun elevation changes out of range after turning the light on.
The motion sensor is only detected when sensing a change from âoffâ to âonâ, not from ânot availableâ to âonâ. (Sometimes Ikea tradfri sensors show this behavior)