summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/sensors/power.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-04-11 22:33:28 +0200
committermakefu <github@syntax-fehler.de>2023-04-11 22:49:26 +0200
commit6e44c39fe0946d29436766c49ee73de6c69191c8 (patch)
tree657e209c66b93c8bbe2e9c3c3d7c8d77ad13b36f /krebs/2configs/shack/glados/sensors/power.nix
parent7239ec83c5531fa100d1863fec9d82033d13ad34 (diff)
k shack/glados: now a docker deployment
Diffstat (limited to 'krebs/2configs/shack/glados/sensors/power.nix')
-rw-r--r--krebs/2configs/shack/glados/sensors/power.nix29
1 files changed, 0 insertions, 29 deletions
diff --git a/krebs/2configs/shack/glados/sensors/power.nix b/krebs/2configs/shack/glados/sensors/power.nix
deleted file mode 100644
index d9b5c7c65..000000000
--- a/krebs/2configs/shack/glados/sensors/power.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-let
- power_x = name: phase:
- { platform = "mqtt";
- name = "${phase} ${name}";
- state_topic = "/power/total/${phase}/${name}";
- availability_topic = "/power/lwt";
- payload_available = "Online";
- payload_not_available = "Offline";
- };
- power_consumed =
- { platform = "mqtt";
- name = "Power Consumed";
- device_class = "power";
- state_topic = "/power/total/consumed";
- availability_topic = "/power/lwt";
- payload_available = "Online";
- payload_not_available = "Offline";
- };
- power_volt = power_x "Voltage";
- power_watt = (power_x "Power") ;
- power_curr = power_x "Current";
-in
-{
- services.home-assistant.config.sensor =
- (map power_volt [ "L1" "L2" "L3" ])
-++ (map (x: ((power_watt x) // { device_class = "power"; })) [ "L1" "L2" "L3" ])
-++ (map power_curr [ "L1" "L2" "L3" ])
-++ [ power_consumed ];
-}