diff --git a/modules/nixos/homeassistant/automations/default.nix b/modules/nixos/homeassistant/automations/default.nix index d13cc90..38ceaae 100644 --- a/modules/nixos/homeassistant/automations/default.nix +++ b/modules/nixos/homeassistant/automations/default.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, namespace, ... }: @@ -161,9 +162,6 @@ let # Generate all automations as list lightswitchAutomations = mapAttrsToList mkLightswitchAutomation cfg.lightswitch; - - # YAML format generator - yamlFormat = pkgs.formats.yaml { }; in { options.${namespace}.services.home-assistant.automation = { @@ -190,6 +188,6 @@ in config = { environment.etc."lightswitch-automations.yaml".source = - yamlFormat.generate "lightswitch-automations.yaml" allAutomations; + yamlFormat.generate "lightswitch-automations.yaml" lightswitchAutomations; }; -} \ No newline at end of file +} diff --git a/systems/x86_64-linux/nuc-nixos/default.nix b/systems/x86_64-linux/nuc-nixos/default.nix index 6f0b47f..13aaf24 100644 --- a/systems/x86_64-linux/nuc-nixos/default.nix +++ b/systems/x86_64-linux/nuc-nixos/default.nix @@ -72,7 +72,7 @@ automation = { lightswitch = { living-room-lights = { - id = "1741726347213"; + id = 1741726347213; alias = "Living Room Light Switch"; mqttDeviceId = "958ff6b3c9df0db21e418aaf6410b996"; lightEntityId = "light.living_room_lights";