Improve indoor motion alert automation

This commit is contained in:
2026-04-06 19:31:13 +02:00
parent 6cf1730723
commit d0379f31ee
+33 -35
View File
@@ -1,42 +1,39 @@
- alias: 'Der er nogen i huset'
trigger:
- platform: state
entity_id: binary_sensor.hue_motion_sensor_2_motion_2
to: 'on'
- platform: state
entity_id: binary_sensor.hue_motion_sensor_2_motion
to: 'on'
- platform: state
entity_id: binary_sensor.hue_motion_sensor_1_motion_2
to: 'on'
- platform: state
entity_id: binary_sensor.bad_motion_sensor_motion
to: 'on'
- platform: state
entity_id: binary_sensor.gang_sensor_motion
to: 'on'
- platform: state
entity_id: binary_sensor.forgang_sensor_motion
to: 'on'
condition:
- condition: state
entity_id: group.nogen_hjemme
state: 'Away'
action:
- service: notify.mobile_app_clausiphone
- alias: "Der er nogen i huset"
mode: single
trigger:
- platform: state
entity_id: binary_sensor.hue_motion_sensor_2_motion_2
to: "on"
- platform: state
entity_id: binary_sensor.hue_motion_sensor_2_motion
to: "on"
- platform: state
entity_id: binary_sensor.hue_motion_sensor_1_motion_2
to: "on"
- platform: state
entity_id: binary_sensor.bad_motion_sensor_motion
to: "on"
- platform: state
entity_id: binary_sensor.gang_sensor_motion
to: "on"
- platform: state
entity_id: binary_sensor.forgang_sensor_motion
to: "on"
condition:
- condition: state
entity_id: binary_sensor.family_presence
state: "off"
action:
- service: notify.mobile_app_clausiphone15
data:
message: "Der er nogen i huset"
# - service: script.sonos_say
# data:
# sonos_entity: media_player.alrum
# volume: 0.4
# delay: '00:00:05'
# message: 'Der er nogen i indkørslen'
message: >-
Der er nogen i huset.
Bevægelse registreret af {{ trigger.to_state.name or trigger.entity_id }}.
- service: scene.create
data:
scene_id: before
snapshot_entities:
- light.pendle1
- light.pendle1
- service: light.turn_on
data:
entity_id: light.pendle1
@@ -45,7 +42,8 @@
flash: long
- delay: 2
- service: scene.turn_on
entity_id: scene.before
target:
entity_id: scene.before