about summary refs log tree commit diff
path: root/pkgs/servers/home-assistant
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2024-02-22 16:37:28 +0100
committerGitHub <noreply@github.com>2024-02-22 16:37:28 +0100
commit6604bca690821caa56539d5cdca8d69598f3eaa7 (patch)
treeeb6c68dd1c5cd97a142520c54ff41709b3e4172e /pkgs/servers/home-assistant
parentfaadcf03b60cab394ecb803add991b2240389e5f (diff)
parent9c2b998ab0081090ef5635034dce078d7f0390c0 (diff)
downloadnixlib-6604bca690821caa56539d5cdca8d69598f3eaa7.tar
nixlib-6604bca690821caa56539d5cdca8d69598f3eaa7.tar.gz
nixlib-6604bca690821caa56539d5cdca8d69598f3eaa7.tar.bz2
nixlib-6604bca690821caa56539d5cdca8d69598f3eaa7.tar.lz
nixlib-6604bca690821caa56539d5cdca8d69598f3eaa7.tar.xz
nixlib-6604bca690821caa56539d5cdca8d69598f3eaa7.tar.zst
nixlib-6604bca690821caa56539d5cdca8d69598f3eaa7.zip
Merge pull request #289061 from mweinelt/multiple-entity-rows
home-assistant-custom-lovelace-modules.multiple-entity-row: init at 4.5.0
Diffstat (limited to 'pkgs/servers/home-assistant')
-rw-r--r--pkgs/servers/home-assistant/custom-lovelace-modules/default.nix2
-rw-r--r--pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/default.nix51
-rw-r--r--pkgs/servers/home-assistant/custom-lovelace-modules/multiple-entity-row/package.json39
3 files changed, 92 insertions, 0 deletions
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 <ben@tomlin.no>",
+  "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"
+  }
+}