dotfiles/nixng/containers/home-assistant/configs/automations/alarm/triggered.nix

34 lines
701 B
Nix
Raw Normal View History

{
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";
}
];
}