This commit is contained in:
mjallen18
2025-11-24 15:12:14 -06:00
parent 875498d07b
commit 5aaae9ca99

View File

@@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
pkgs,
namespace, namespace,
... ...
}: }:
@@ -116,13 +115,13 @@ let
mode: single mode: single
''; '';
lightswitchAutomations = concatStringsSep "\n" (mapAttrsToList (_: automationToYaml) cfg.lightswitch); lightswitchAutomations = concatStringsSep "\n" (
mapAttrsToList (_: automationToYaml) cfg.lightswitch
);
in in
{ {
options.${namespace}.services.home-assistant.automation = { options.${namespace}.services.home-assistant.automation = {
lightswitch = lightswitch = mkOpt (types.attrsOf (
mkOpt
(types.attrsOf (
types.submodule { types.submodule {
options = { options = {
id = mkOpt types.int 0 "Automation Id"; id = mkOpt types.int 0 "Automation Id";
@@ -137,9 +136,7 @@ in
brightnessStepPercent = mkOpt types.int 10 "dimmer step in brightness percent"; brightnessStepPercent = mkOpt types.int 10 "dimmer step in brightness percent";
}; };
} }
)) )) { } "lightswitch automations";
{ }
"lightswitch automations";
}; };
config = { config = {