Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
ha-blueprints
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton Sarukhanov
ha-blueprints
Commits
cd564a5e
Commit
cd564a5e
authored
1 year ago
by
Anton Sarukhanov
Browse files
Options
Downloads
Patches
Plain Diff
ic
parents
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
motion_light.yaml
+55
-0
55 additions, 0 deletions
motion_light.yaml
with
55 additions
and
0 deletions
motion_light.yaml
0 → 100644
+
55
−
0
View file @
cd564a5e
blueprint
:
name
:
Motion and brightness activated Light V2
description
:
Turn on a light when motion is detected and it is dark enough or night.
domain
:
automation
source_url
:
https://git.xhost.io/anton/ha-blueprints/-/blob/master/motion_light.yaml
input
:
motion_entity
:
name
:
Motion Sensor
selector
:
entity
:
domain
:
binary_sensor
device_class
:
motion
multiple
:
true
light_target
:
name
:
Light(s) to control
selector
:
target
:
entity
:
domain
:
light
no_motion_wait
:
name
:
Wait time
description
:
Time to leave the light on after last motion is detected.
default
:
120
selector
:
number
:
min
:
0
max
:
3600
unit_of_measurement
:
seconds
# If motion is detected within the delay,
# we restart the script.
mode
:
restart
max_exceeded
:
silent
# making the input variable usable in the condition
variables
:
lights
:
!input
"
light_target"
trigger
:
platform
:
state
entity_id
:
!input
motion_entity
from
:
"
off"
to
:
"
on"
action
:
-
service
:
light.turn_on
target
:
!input
light_target
-
wait_for_trigger
:
platform
:
state
entity_id
:
!input
motion_entity
from
:
"
on"
to
:
"
off"
-
delay
:
!input
no_motion_wait
-
service
:
light.turn_off
target
:
!input
light_target
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment