From 87d22fba6dce427f06d1021e37c77c2fb70c3657 Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Mon, 28 Apr 2025 22:39:37 +0200 Subject: [PATCH] fix: electricity sensor home assistant --- hosts/fw/modules/home-assistant/electricity.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/fw/modules/home-assistant/electricity.nix b/hosts/fw/modules/home-assistant/electricity.nix index bf92b52..3698843 100644 --- a/hosts/fw/modules/home-assistant/electricity.nix +++ b/hosts/fw/modules/home-assistant/electricity.nix @@ -18,8 +18,12 @@ in { friendly_name = "Current Price of electricity"; unit_of_measurement = "EUR/kWh"; value_template = '' - {{ ((states('sensor.epex_spot_data_price') | int ) + (0.0149 + 0.074 + 0.007 + 0.0074 + 0.0006)) | float }} + {{ ((states('sensor.epex_spot_data_price') | float ) + (0.0149 + 0.074 + 0.007 + 0.0074 + 0.0006)) | float }} ''; + entity_id = [ + "sensor.epex_spot_data_price" + "sensor.time" + ]; }; }; }