Phrana
(Phrana)
March 19, 2025, 8:29pm
1
Hello, can someone tell me why this automation only records from 10:00 to 22:00?
id: '1727121970412'
alias: Grabacion timbre
description: ''
triggers:
- type: motion
device_id: bb19d544320ae3ffbc8419a4f9e43eca
entity_id: eae134f1b723453c1c2424b0febfd1914
domain: binary_sensor
trigger: device
enabled: true
- trigger: state
entity_id:
- binary_sensor.puerta_principal_motion
attribute: personDetected
enabled: false
conditions: []
actions:
- action: camera.record
target:
entity_id: camera.172_23_0_2
data:
filename: >-
/media/Grabaciones/HA/Entrada_{{ now().strftime('%Y-%m-%d_%H-%M-%S')
}}.mp4
duration: 30
mode: queued
max: 10
type or paste code here
Hello Phrana ,
Are both triggers for the same sensor? Do you know which are triggering.
So a couple of thoughts, if the device trigger and state trigger are for the same sensor, dump the device trigger.
Is there any other software involved. I suspect something like an app that set the detection enable to only work certain times of day. like 10am to 10pm…
Phrana
(Phrana)
March 20, 2025, 1:28pm
3
You can see in the image that there is only one trigger, in the mobile app, all detections appear
I can’t see the text in the image. Screenshots are not my friend.
How to help us help you - or How to ask a good question .
Phrana
(Phrana)
March 20, 2025, 8:33pm
5
The code that is in the first post is the same as in automations.yaml and there are no more triggers
Phrana
(Phrana)
April 4, 2025, 11:55am
6
I have tried differently but nothingi
id: '1727121970412'
alias: Grabacion timbre
description: ''
triggers:
- type: motion
device_id: bb19d544320ae3ffbc8419a4f9e43eca
entity_id: eae134f1b723453c1c2424b0febfd1914
domain: binary_sensor
trigger: device
enabled: true
- trigger: state
entity_id:
- binary_sensor.puerta_principal_motion
attribute: personDetected
enabled: false
conditions: []
actions:
- action: camera.record
target:
entity_id: camera.172_23_0_2
data:
filename: >-
/media/Grabaciones/HA/Entrada_{{ now().timestamp() |
timestamp_custom('%Y-%m-%d_%H-%M-%S') }}.mp4
duration: 30
mode: queued
max: 10
I would suggest you to post screenshots in English.
Screenshots should be understandable by community members.
The question was - “what is a point to have 2 triggers instead of one”?
(another issue is about using a device-id-based trigger instead of a normal, reliable and maintainable entity-id-based one - link ).