mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-11 17:31:58 +01:00
47ad385ca2
Signed-off-by: Magic_RB <magic_rb@redalder.org>
33 lines
701 B
Nix
33 lines
701 B
Nix
{
|
|
alias = "Alarm - Triggered";
|
|
id = "6b9c6dac-2c6b-4add-b499-8e2b134e5d9c";
|
|
|
|
trigger = [
|
|
{
|
|
entity_id = "alarm_control_panel.home_alarm";
|
|
platform = "state";
|
|
to = "triggered";
|
|
}
|
|
];
|
|
action = [
|
|
{
|
|
service = "camera.record";
|
|
target.entity_id = "camera.mirror_camera";
|
|
data = {
|
|
lookback = 30;
|
|
duration = 30;
|
|
filename = "/mnt/cctv/cctv-{{ states('sensor.date_time_iso') }}.mp4";
|
|
};
|
|
}
|
|
{
|
|
data = {
|
|
message = "Alarm Triggered - Motion Detected!";
|
|
data = {
|
|
channel = "Motion";
|
|
importance = "high";
|
|
};
|
|
};
|
|
service = "notify.mobile_app_redrum";
|
|
}
|
|
];
|
|
}
|