Improve indoor motion alert automation

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