testing
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
namespace,
|
namespace,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@@ -161,9 +162,6 @@ let
|
|||||||
|
|
||||||
# Generate all automations as list
|
# Generate all automations as list
|
||||||
lightswitchAutomations = mapAttrsToList mkLightswitchAutomation cfg.lightswitch;
|
lightswitchAutomations = mapAttrsToList mkLightswitchAutomation cfg.lightswitch;
|
||||||
|
|
||||||
# YAML format generator
|
|
||||||
yamlFormat = pkgs.formats.yaml { };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.${namespace}.services.home-assistant.automation = {
|
options.${namespace}.services.home-assistant.automation = {
|
||||||
@@ -190,6 +188,6 @@ in
|
|||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.etc."lightswitch-automations.yaml".source =
|
environment.etc."lightswitch-automations.yaml".source =
|
||||||
yamlFormat.generate "lightswitch-automations.yaml" allAutomations;
|
yamlFormat.generate "lightswitch-automations.yaml" lightswitchAutomations;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
automation = {
|
automation = {
|
||||||
lightswitch = {
|
lightswitch = {
|
||||||
living-room-lights = {
|
living-room-lights = {
|
||||||
id = "1741726347213";
|
id = 1741726347213;
|
||||||
alias = "Living Room Light Switch";
|
alias = "Living Room Light Switch";
|
||||||
mqttDeviceId = "958ff6b3c9df0db21e418aaf6410b996";
|
mqttDeviceId = "958ff6b3c9df0db21e418aaf6410b996";
|
||||||
lightEntityId = "light.living_room_lights";
|
lightEntityId = "light.living_room_lights";
|
||||||
|
|||||||
Reference in New Issue
Block a user