diff options
author | makefu <github@syntax-fehler.de> | 2020-03-13 10:50:18 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-03-13 10:50:24 +0100 |
commit | 6cc25488bf92b3d5345dae3ea93b66f7652b6255 (patch) | |
tree | 7ae206c306d66d714997e7541679aee2030b2ff9 /krebs/2configs/shack/glados | |
parent | 947e68fb25364b62a6336fb9289a7d127294b588 (diff) |
shack: update node-light, update glados
Diffstat (limited to 'krebs/2configs/shack/glados')
-rw-r--r-- | krebs/2configs/shack/glados/default.nix | 5 | ||||
-rw-r--r-- | krebs/2configs/shack/glados/switch/power.nix | 32 |
2 files changed, 36 insertions, 1 deletions
diff --git a/krebs/2configs/shack/glados/default.nix b/krebs/2configs/shack/glados/default.nix index 3f3b1cac5..920f2ed2f 100644 --- a/krebs/2configs/shack/glados/default.nix +++ b/krebs/2configs/shack/glados/default.nix @@ -91,7 +91,10 @@ in { retain = true; }; }; - switch = wasser.switch; + switch = + wasser.switch + ++ (import ./switch/power.nix) + ; light = []; media_player = [ { platform = "mpd"; diff --git a/krebs/2configs/shack/glados/switch/power.nix b/krebs/2configs/shack/glados/switch/power.nix new file mode 100644 index 000000000..4e9a45c28 --- /dev/null +++ b/krebs/2configs/shack/glados/switch/power.nix @@ -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") +] |