From ee4d0909afd797cc6c4eebdd906c1c4e9a0f137a Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 8 Dec 2025 22:02:48 +0100 Subject: [PATCH] home-assistant: add ESP-2 plugs for monitor and pc --- modules/hosts/nixberry/homeassistant.nix | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/modules/hosts/nixberry/homeassistant.nix b/modules/hosts/nixberry/homeassistant.nix index 81d06b8..d1e7119 100644 --- a/modules/hosts/nixberry/homeassistant.nix +++ b/modules/hosts/nixberry/homeassistant.nix @@ -55,6 +55,44 @@ "100.86.250.97" # loptland tailscale ]; }; + + sensor = [ + { + platform = "template"; + sensors = { + holli_monitors_power_fixed = { + friendly_name = "Holli Monitors Power fixed"; + unit_of_measurement = "W"; + value_template = "{{ (states('sensor.holli_monitors_power') | float / 10) | round(1) }}"; + device_class = "energy"; + }; + holli_pc_power_fixed = { + friendly_name = "Holli PC Power fixed"; + unit_of_measurement = "W"; + value_template = "{{ (states('sensor.holli_pc_power') | float / 10) | round(1) }}"; + device_class = "energy"; + }; + }; + } + { + name = "Holli PC Total Energy"; + platform = "integration"; + source = "sensor.holli_pc_power_fixed"; + unique_id = "holli_pc_total_energy"; + unit_prefix = "k"; + unit_time = "h"; + method = "left"; + } + { + name = "Holli Monitors Total Energy"; + platform = "integration"; + source = "sensor.holli_monitors_power_fixed"; + unique_id = "holli_monitors_total_energy"; + unit_prefix = "k"; + unit_time = "h"; + method = "left"; + } + ]; }; lovelaceConfigWritable = true;