shack: update node-light, update glados
This commit is contained in:
parent
947e68fb25
commit
6cc25488bf
krebs/2configs/shack
|
@ -91,7 +91,10 @@ in {
|
|||
retain = true;
|
||||
};
|
||||
};
|
||||
switch = wasser.switch;
|
||||
switch =
|
||||
wasser.switch
|
||||
++ (import ./switch/power.nix)
|
||||
;
|
||||
light = [];
|
||||
media_player = [
|
||||
{ platform = "mpd";
|
||||
|
|
32
krebs/2configs/shack/glados/switch/power.nix
Normal file
32
krebs/2configs/shack/glados/switch/power.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
# 1 - haupt
|
||||
# 2 - dusche
|
||||
# 3 - warmwasser
|
||||
# 4 - or
|
||||
# 5 - kueche
|
||||
let
|
||||
nodelight = type: ident: name: {
|
||||
platform = "mqtt";
|
||||
name = "${type} ${name}";
|
||||
command_topic = "${type}/${toString ident}/command";
|
||||
state_topic = "${type}/${toString ident}/state";
|
||||
payload_on = "on";
|
||||
payload_off = "off";
|
||||
};
|
||||
power = nodelight "power";
|
||||
light = ident: name: { icon = "mdi:lightbulb";} // nodelight "light" ident name;
|
||||
in
|
||||
[
|
||||
(power 1 "Hauptschalter")
|
||||
(power 2 "Dusche")
|
||||
(power 3 "Warmwasser")
|
||||
(power 4 "Optionsräume")
|
||||
(power 5 "Küche")
|
||||
(light 1 "Decke Lounge 1")
|
||||
(light 2 "Decke Lounge 2")
|
||||
(light 3 "Decke Lounge 3")
|
||||
(light 4 "Decke Lounge 4")
|
||||
(light 5 "Decke Lounge 5")
|
||||
(light 6 "Decke Lounge 6")
|
||||
(light 7 "Decke Lounge 7")
|
||||
(light 8 "Decke Lounge 8")
|
||||
]
|
|
@ -4,9 +4,9 @@ let
|
|||
pkg = pkgs.callPackage (
|
||||
pkgs.fetchgit {
|
||||
url = "https://git.shackspace.de/rz/node-light.git";
|
||||
rev = "9c3fe451897cf170fb192a2643180fdfe22388e8";
|
||||
sha256 = "1zsc38idg452r8wpcna5m3yqx0ri11bd1bw60bl0kpz96dqqnyba";
|
||||
}) { mkYarnPackage = pkgs.yarn2nix-moretea.mkYarnPackage; };
|
||||
rev = "90a9347b73af3a9960bd992e6293b357226ef6a0";
|
||||
sha256 = "1av9w3w8aknlra25jw6gqxzbb01i9kdlfziy29lwz7mnryjayvwk";
|
||||
}) { };
|
||||
home = "/var/lib/node-light";
|
||||
port = "8082";
|
||||
in {
|
||||
|
|
Loading…
Reference in a new issue