dotfiles/nixng/containers/home-assistant/configs/automations/alarm/armed_away.nix
Magic_RB 47ad385ca2 Add the NixNG containers for Home Assistant
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2023-06-16 16:08:09 +02:00

45 lines
895 B
Nix

{
alias = "Alarm - Armed Check Windows";
id = "8748ce03-2910-468e-8764-8d43604a051d";
trigger = [
{
entity_id = "alarm_control_panel.home_alarm";
platform = "state";
to = "armed";
}
];
condition = {
condition = "or";
conditions = [
{
condition = "state";
entity_id = "binary_sensor.left_window_contact";
state = "on";
}
{
condition = "state";
entity_id = "binary_sensor.right_window_contact";
state = "on";
}
];
};
action = [
{
service = "alarm_control_panel.disarm";
entity_id = "alarm_control_panel.home_alarm";
}
{
data = {
message = "Alarm arming failed - Window Open!";
data = {
channel = "Motion";
importance = "high";
};
};
service = "notify.modile_app_redrum";
}
];
}