From 9c2b998ab0081090ef5635034dce078d7f0390c0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 15 Feb 2024 15:38:01 +0100 Subject: [PATCH] home-assistant-custom-lovelace-modules.multiple-entity-row: init at 4.5.0 Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI. https://github.com/benct/lovelace-multiple-entity-row --- .../custom-lovelace-modules/default.nix | 2 + .../multiple-entity-row/default.nix | 51 +++++++++++++++++++ .../multiple-entity-row/package.json | 39 ++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/package.json diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index 49bdb62ad85e..f7dbc32c8e93 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -8,6 +8,8 @@ mini-media-player = callPackage ./mini-media-player {}; + multiple-entity-row = callPackage ./multiple-entity-row { }; + mushroom = callPackage ./mushroom { }; zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix new file mode 100644 index 000000000000..64a3bf351aa6 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix @@ -0,0 +1,51 @@ +{ lib +, mkYarnPackage +, fetchFromGitHub +, fetchYarnDeps +}: + +mkYarnPackage rec { + pname = "multiple-entity-row"; + version = "4.5.0"; + + src = fetchFromGitHub { + owner = "benct"; + repo = "lovelace-multiple-entity-row"; + rev = "v${version}"; + hash = "sha256-3CkBzxB3bX4jwk71PaRMX1MkAb6UVOBqZCYpTN7VORY="; + }; + + packageJSON = ./package.json; + + offlineCache = fetchYarnDeps { + yarnLock = "${src}/yarn.lock"; + hash = "sha256-8YIcQhbYf0e2xO620zVHEk/0sssBmzF/jCq+2za+D6E="; + }; + + buildPhase = '' + runHook preBuild + + yarn --offline build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir $out + install -m0644 ./deps/multiple-entity-row/multiple-entity-row.js $out + + runHook postInstall + ''; + + doDist = false; + + meta = with lib; { + description = "Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI"; + homepage = "https://github.com/benct/lovelace-multiple-entity-row"; + changelog = "https://github.com/benct/lovelace-multiple-entity-row/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/package.json b/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/package.json new file mode 100644 index 000000000000..7cb2274007d4 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/package.json @@ -0,0 +1,39 @@ +{ + "name": "multiple-entity-row", + "version": "4.5.0", + "description": "Show multiple entity states, attributes and icons on entity rows in Home Assistant's Lovelace UI", + "keywords": [ + "home-assistant", + "homeassistant", + "lovelace", + "custom-cards", + "multiple", + "entity", + "row" + ], + "module": "multiple-entity-row.js", + "repository": "https://github.com/benct/lovelace-multiple-entity-row.git", + "author": "benct ", + "license": "MIT", + "dependencies": { + "custom-card-helpers": "1.8.0", + "lit": "^2.7.4", + "memoize-one": "^6.0.0" + }, + "devDependencies": { + "@babel/core": "^7.22.1", + "@babel/preset-env": "^7.22.4", + "babel-loader": "^9.1.2", + "eslint": "^8.41.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-prettier": "^4.2.1", + "prettier": "^2.8.8", + "webpack": "^5.84.1", + "webpack-cli": "^5.1.1" + }, + "scripts": { + "lint": "eslint src/**/*.js", + "dev": "webpack -c webpack.config.js", + "build": "yarn lint && webpack -c webpack.config.js" + } +}