summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/multi/wasser.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-01-07 16:52:31 +0100
committermakefu <github@syntax-fehler.de>2020-01-07 16:52:31 +0100
commit4ad85faacedc755fd25b7edd0df41234c98876f0 (patch)
tree06f501161bdb8927987d438093e185803f14a46d /krebs/2configs/shack/glados/multi/wasser.nix
parent479ce8c4c5747d6da60d2d907d662e7a5708bfd7 (diff)
shack/glados: init hass config
Diffstat (limited to 'krebs/2configs/shack/glados/multi/wasser.nix')
-rw-r--r--krebs/2configs/shack/glados/multi/wasser.nix17
1 files changed, 3 insertions, 14 deletions
diff --git a/krebs/2configs/shack/glados/multi/wasser.nix b/krebs/2configs/shack/glados/multi/wasser.nix
index 578bb0750..e3e7eb2a0 100644
--- a/krebs/2configs/shack/glados/multi/wasser.nix
+++ b/krebs/2configs/shack/glados/multi/wasser.nix
@@ -1,23 +1,12 @@
let
- tasmota_plug = name: topic:
- { platform = "mqtt";
- inherit name;
- state_topic = "sonoff/stat/${topic}/POWER1";
- command_topic = "sonoff/cmnd/${topic}/POWER1";
- availability_topic = "sonoff/tele/${topic}/LWT";
- payload_on= "ON";
- payload_off= "OFF";
- payload_available= "Online";
- payload_not_available= "Offline";
- retain = false;
- qos = 1;
- };
+ glados = import ../lib;
seconds = 20;
in
{
switch = [
- (tasmota_plug "Wasser" "plug")
+ (glados.tasmota.plug "Wasser" "plug")
];
+
automation =
[
{ alias = "Water the plant for ${toString seconds} seconds";