diff options
author | makefu <github@syntax-fehler.de> | 2020-12-01 23:20:31 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-12-01 23:20:31 +0100 |
commit | c370c87da36bc256cfbc59bb2b0b9ffa1d457168 (patch) | |
tree | 43b5ef43963f9cedcb7273d7fb1c4dc01afffb62 /krebs/2configs/shack/glados/sensors/power.nix | |
parent | 9f2c161de0f7e807e66dd114f913db6acecd666b (diff) |
shack/glados: utilize mergeable home-assistant config
Diffstat (limited to 'krebs/2configs/shack/glados/sensors/power.nix')
-rw-r--r-- | krebs/2configs/shack/glados/sensors/power.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/krebs/2configs/shack/glados/sensors/power.nix b/krebs/2configs/shack/glados/sensors/power.nix index b168f2beb..d9b5c7c65 100644 --- a/krebs/2configs/shack/glados/sensors/power.nix +++ b/krebs/2configs/shack/glados/sensors/power.nix @@ -20,7 +20,10 @@ let 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 ] +++ [ power_consumed ]; +} |