From 2878943745dbb1d2526e6f1464c9e5463aaf49d8 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 2 Feb 2025 20:14:21 -0500 Subject: [PATCH] feat(zigbee): force restart z2m --- configurations/homie/modules/home-assistant/zigbee.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configurations/homie/modules/home-assistant/zigbee.nix b/configurations/homie/modules/home-assistant/zigbee.nix index 193c5959..4e3fcac9 100644 --- a/configurations/homie/modules/home-assistant/zigbee.nix +++ b/configurations/homie/modules/home-assistant/zigbee.nix @@ -1,4 +1,6 @@ -{...}: { +{lib, ...}: let + inherit (lib) mkForce; +in { services = { home-assistant = { extraComponents = [ @@ -44,4 +46,10 @@ }; }; }; + + # Make sure it stays running through SMLIGHT reboots + systemd.services."zigbee2mqtt".serviceConfig = { + Restart = mkForce "always"; + StartLimitIntervalSec = 0; + }; }