From 1a612199ae6776df6b7ee25cc64fe4d759e6d1ff Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sun, 9 Jan 2022 19:05:20 +0100 Subject: [PATCH] =?UTF-8?q?Erg=C3=A4nze=20Warnungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nixos/roles/home-assistant-local/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/roles/home-assistant-local/default.nix b/nixos/roles/home-assistant-local/default.nix index bddc614f..adec3065 100644 --- a/nixos/roles/home-assistant-local/default.nix +++ b/nixos/roles/home-assistant-local/default.nix @@ -342,13 +342,13 @@ in } { alias = "Warnung bei niedrigem Akkustand"; - trigger = - { + trigger = map + (limit: { platform = "numeric_state"; - below = "25"; + below = toString limit; entity_id = batteries; - }; - action = [ (actions.notify "{{ trigger.to_state.name }} ist unter 25%.") ]; + }) [ 25 20 15 10 5 4 3 2 1 ]; + action = [ (actions.notify "{{ trigger.to_state.name }} ist {{ trigger.to_state.value }}%.") ]; } # Warnungen für niedrige Akkustände # Warnungen für hohe Luftfeuchtigkeit