From f541b6839489f3bfbf33c010a190d445d8364985 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 30 Aug 2024 13:45:46 +0200 Subject: [PATCH] home-assistant-custom-lovelace-modules.hourly-weather: init at 6.1.0 Signed-off-by: Matthias Beyer --- .../custom-lovelace-modules/default.nix | 2 + .../hourly-weather/default.nix | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/hourly-weather/default.nix diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index 5af0caced5ef..f716973d14b9 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -14,6 +14,8 @@ decluttering-card = callPackage ./decluttering-card { }; + hourly-weather = callPackage ./hourly-weather { }; + lg-webos-remote-control = callPackage ./lg-webos-remote-control { }; light-entity-card = callPackage ./light-entity-card { }; diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/hourly-weather/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/hourly-weather/default.nix new file mode 100644 index 000000000000..11ec3d02ad85 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/hourly-weather/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: + +buildNpmPackage rec { + pname = "hourly-weather"; + version = "6.1.0"; + + src = fetchFromGitHub { + owner = "decompil3d"; + repo = "lovelace-hourly-weather"; + rev = version; + hash = "sha256-IvwWeksEnq44PhCpUXVufYb8w5XEX9Dk0LMLLeM7Dps="; + }; + + npmDepsHash = "sha256-4uQfaYMg533xZobAl6+/9+FsHAFBm03wrF01nDa53Qg="; + + env.CYPRESS_INSTALL_BINARY = "0"; + + installPhase = '' + runHook preInstall + + mkdir $out + cp dist/hourly-weather.js $out + + runHook postInstall + ''; + + meta = with lib; { + description = "Hourly weather card for Home Assistant. Visualize upcoming weather conditions as a colored horizontal bar"; + homepage = "https://github.com/decompil3d/lovelace-hourly-weather"; + license = licenses.mit; + maintainers = with maintainers; [ matthiasbeyer ]; + platforms = platforms.all; + }; +}