From 8fb2b628a0f906c58ccc7ae1d42c9509be4af27c Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 1 May 2020 03:36:51 +0200 Subject: [PATCH] home-assistant: a bit of cleanup --- configs/pepe/home-assistant.nix | 1 + configs/pepe/home-assistant/sonoff.nix | 4 ++-- configs/pepe/home-assistant/zigbee2mqtt/motion.nix | 10 +--------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/configs/pepe/home-assistant.nix b/configs/pepe/home-assistant.nix index 961c8da..863b5aa 100644 --- a/configs/pepe/home-assistant.nix +++ b/configs/pepe/home-assistant.nix @@ -101,6 +101,7 @@ in { entity_id = "group.${presentsGroup}"; from = "on"; to = "off"; + for.seconds = 2 * 60; }; condition = { condition = "state"; diff --git a/configs/pepe/home-assistant/sonoff.nix b/configs/pepe/home-assistant/sonoff.nix index bcc52a5..d5f3074 100644 --- a/configs/pepe/home-assistant/sonoff.nix +++ b/configs/pepe/home-assistant/sonoff.nix @@ -8,9 +8,9 @@ let groups = [ "all_lights" "bed_room_lights" "bed_room" ]; }; "pal02" = { - label = "Wohnzimmer Lampe"; + label = "Nummer 2"; icon = "mdi:lightbulb"; - groups = [ "all_lights" "living_room_lights" "living_room" ]; + # groups = [ ]; }; "pal03" = { label = "Wohnzimmer Lampe"; diff --git a/configs/pepe/home-assistant/zigbee2mqtt/motion.nix b/configs/pepe/home-assistant/zigbee2mqtt/motion.nix index 3a84d16..f519849 100644 --- a/configs/pepe/home-assistant/zigbee2mqtt/motion.nix +++ b/configs/pepe/home-assistant/zigbee2mqtt/motion.nix @@ -7,49 +7,41 @@ let "motion_sensor_1" = { id = "0x00158d0002fbd451"; groups = [ "kitchen_room" "kitchen_room_present" ]; - timeout = 60 * 2; }; "motion_sensor_2" = { id = "0x00158d0002f9a6b8"; groups = [ "kitchen_room" "kitchen_room_present" ]; - timeout = 60 * 2; }; "motion_sensor_3" = { id = "0x00158d0002f04522"; groups = [ "living_room" "living_room_present" ]; - timeout = 60 * 3; }; "motion_sensor_4" = { id = "0x00158d0002f9a558"; groups = [ "living_room" "living_room_present" ]; - timeout = 60 * 3; }; "motion_sensor_5" = { id = "0x00158d0002f9a56f"; groups = [ "bath_room" "bath_room_present" ]; - timeout = 60 * 3; }; "motion_sensor_6" = { id = "0x00158d0002f9a5cb"; groups = [ "floor_room" "floor_room_present" ]; - timeout = 60 * 2; }; "motion_sensor_7" = { id = "0x00158d0002f9a6aa"; groups = [ "bed_room" "bed_room_present" ]; - timeout = 60 * 1.2; }; "motion_sensor_8" = { id = "0x00158d0002f04637"; groups = [ "bath_room" "bath_room_present" ]; - timeout = 60 * 3; }; }; in { services.zigbee2mqtt.devices = lib.mapAttrs' (name: - { id, timeout ? 90, ... }: { + { id, timeout ? 65, ... }: { name = id; value = { retain = false;