adds sections

This commit is contained in:
2026-03-02 17:45:09 +01:00
parent 8ff6e5715a
commit ed27372199

View File

@@ -1,79 +1,91 @@
blueprint: blueprint:
name: Motion activated scene name: Motion activated scene
description: Activates different scenes for daytime/nighttime on detecting motion and returns to an off-scene after a configurable timeout or exceeded illuminace threshold. description: Activates different scenes for daytime/nighttime on detecting motion and returns to an off-scene after a configurable timeout or exceeded illuminace threshold.
source_url: https://git.klelifo.de/projects/hass-blueprints/raw/branch/main/motion_activated_scene.yaml
domain: automation domain: automation
author: Florian Klemenz author: Florian Klemenz
input: input:
motion_sensors: motion_section:
name: Motion/Presence/Occupancy Sensors name: "Motion"
selector: #icon: mdi:window-shutter-cog
entity: description: Configure motion activation
multiple: true input:
filter: motion_sensors:
- domain: binary_sensor name: Motion/Presence/Occupancy Sensors
device_class: motion selector:
- domain: binary_sensor entity:
device_class: occupancy multiple: true
- domain: binary_sensor filter:
device_class: presence - domain: binary_sensor
no_motion_wait: device_class: motion
name: Wait time - domain: binary_sensor
description: Time to leave the scene on after last motion is detected. device_class: occupancy
default: 120 - domain: binary_sensor
selector: device_class: presence
number: no_motion_wait:
min: 0 name: Wait time
max: 300 description: Time to leave the scene on after last motion is detected.
unit_of_measurement: seconds default: 120
illuminance_sensors: selector:
name: Illuminance sensors number:
description: The illuminance sensor to get lux data. min: 0
selector: max: 300
entity: unit_of_measurement: seconds
multiple: true illuminance_section:
filter: name: "Illuminance"
domain: sensor #icon: mdi:window-shutter-cog
device_class: illuminance description: Configure illuminance override
illuminance_cutoff: input:
name: Illuminance threshold illuminance_sensors:
description: Lux above this threshold will activate the "off" scene. name: Illuminance sensors
default: 10 description: The illuminance sensor to get lux data.
selector: selector:
number: entity:
min: 0 multiple: true
max: 100 filter:
unit_of_measurement: lx domain: sensor
daytime_trigger: device_class: illuminance
name: Daytime illuminance_cutoff:
description: Binary sensor (TimeOfDay) or schedule to indicate when it is daytime name: Illuminance threshold
selector: description: Lux above this threshold will activate the "off" scene.
entity: default: 10
filter: selector:
- integration: tod number:
domain: binary_sensor min: 0
- domain: schedule max: 100
feature_section: unit_of_measurement: lx
scene_section:
name: "Scene configuration" name: "Scene configuration"
icon: mdi:window-shutter-cog #icon: mdi:window-shutter-cog
collapsed: true description: Configure times of day schedule and scenes
daytime_scene: input:
name: Daytime scene daytime_trigger:
selector: name: Daytime
entity: description: Binary sensor (TimeOfDay) or schedule to indicate when it is daytime
filter: selector:
domain: scene entity:
nighttime_scene: filter:
name: Nighttime scene - integration: tod
selector: domain: binary_sensor
entity: - domain: schedule
filter: daytime_scene:
domain: scene name: Daytime scene
off_scene: selector:
name: Off scene entity:
selector: filter:
entity: domain: scene
filter: nighttime_scene:
domain: scene name: Nighttime scene
selector:
entity:
filter:
domain: scene
off_scene:
name: Off scene
selector:
entity:
filter:
domain: scene
# If motion is detected within the delay, # If motion is detected within the delay,
# we restart the script. # we restart the script.
@@ -88,43 +100,43 @@ trigger:
action: action:
- choose: - choose:
# "Activate off-scene if illuminance is above threshold" # "Activate off-scene if illuminance is above threshold"
- conditions: - conditions:
- condition: numeric_state - condition: numeric_state
entity_id: !input illuminance_sensors entity_id: !input illuminance_sensors
above: !input illuminance_cutoff above: !input illuminance_cutoff
sequence: sequence:
- service: scene.turn_on - service: scene.turn_on
target: target:
entity_id: !input off_scene entity_id: !input off_scene
- conditions: [] - conditions: []
sequence: sequence:
# "Activate day-/-night scene depending on time of day" # "Activate day-/-night scene depending on time of day"
- choose: - choose:
- conditions: - conditions:
- condition: state - condition: state
alias: "Check for daytime" alias: "Check for daytime"
entity_id: !input daytime_trigger entity_id: !input daytime_trigger
state: 'on' state: 'on'
sequence: sequence:
- service: scene.turn_on - service: scene.turn_on
target: target:
entity_id: !input daytime_scene entity_id: !input daytime_scene
- conditions: [] - conditions: []
sequence: sequence:
- service: scene.turn_on - service: scene.turn_on
target: target:
entity_id: !input nighttime_scene entity_id: !input nighttime_scene
- alias: "Wait until there is no motion from device" - alias: "Wait until there is no motion from device"
wait_for_trigger: wait_for_trigger:
platform: state platform: state
entity_id: !input motion_sensors entity_id: !input motion_sensors
from: "on" from: "on"
to: "off" to: "off"
- alias: "Wait the number of seconds that has been set" - alias: "Wait the number of seconds that has been set"
delay: !input no_motion_wait delay: !input no_motion_wait
- alias: "Activate off scene" - alias: "Activate off scene"
service: scene.turn_on service: scene.turn_on
target: target:
entity_id: !input off_scene entity_id: !input off_scene