Merge pull request #309353 from K900/all-the-cards

home-assistant-custom-lovelace-modules: add a bunch of stuff

authored by Martin Weinelt and committed by GitHub d3dbae6a 80dd7b26

+411
+39
pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix
···
··· 1 + { lib 2 + , buildNpmPackage 3 + , fetchFromGitHub 4 + }: 5 + 6 + buildNpmPackage rec { 7 + pname = "android-tv-card"; 8 + version = "3.6.1"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "Nerwyn"; 12 + repo = "android-tv-card"; 13 + rev = version; 14 + hash = "sha256-bVfaB5s4b0bu8RiPGoyuPzhe2otCPugldmoVQuYX3P8="; 15 + }; 16 + 17 + patches = [ ./dont-call-git.patch ]; 18 + 19 + npmDepsHash = "sha256-yLIf+VXrNF81pq8dbPa+JplNZqhrRnXHEdEk6wJN98A="; 20 + 21 + installPhase = '' 22 + runHook preInstall 23 + 24 + mkdir $out 25 + cp dist/android-tv-card.min.js $out 26 + 27 + runHook postInstall 28 + ''; 29 + 30 + passthru.entrypoint = "android-tv-card.min.js"; 31 + 32 + meta = with lib; { 33 + description = "Universal Customizable TV Remote Card, with HA actions, super configurable touchpad, slider, haptics, and keyboard"; 34 + homepage = "https://github.com/Nerwyn/android-tv-card"; 35 + license = licenses.asl20; 36 + maintainers = with maintainers; [ k900 ]; 37 + platforms = platforms.all; 38 + }; 39 + }
+17
pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/dont-call-git.patch
···
··· 1 + diff --git a/webpack.config.js b/webpack.config.js 2 + index 469ffe1..3233c4b 100644 3 + --- a/webpack.config.js 4 + +++ b/webpack.config.js 5 + @@ -1,11 +1,7 @@ 6 + const path = require('path'); 7 + const { execSync } = require('child_process'); 8 + 9 + -let env = 10 + - execSync('git branch --show-current').toString().trim() == 'main' 11 + - ? 'production' 12 + - : 'development'; 13 + -env = 'production'; 14 + +let env = 'production'; 15 + 16 + module.exports = { 17 + mode: env,
+52
pkgs/servers/home-assistant/custom-lovelace-modules/button-card/default.nix
···
··· 1 + { lib 2 + , mkYarnPackage 3 + , fetchYarnDeps 4 + , fetchFromGitHub 5 + }: 6 + 7 + mkYarnPackage rec { 8 + pname = "button-card"; 9 + version = "4.1.2"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "custom-cards"; 13 + repo = "button-card"; 14 + rev = "v${version}"; 15 + hash = "sha256-Ntg1sNgAehcL2fT0rP0YHzV5q6rB5p1TyFXtbZyB3Vo="; 16 + }; 17 + 18 + packageJSON = ./package.json; 19 + 20 + offlineCache = fetchYarnDeps { 21 + yarnLock = src + "/yarn.lock"; 22 + hash = "sha256-OFnsRR9zA9D22xBdh4XfLueGVA2ERXmGEp54x0OFDFY="; 23 + }; 24 + 25 + buildPhase = '' 26 + runHook preBuild 27 + 28 + yarn build 29 + 30 + runHook postBuild 31 + ''; 32 + 33 + installPhase = '' 34 + runHook preInstall 35 + 36 + mkdir $out 37 + cp ./deps/button-card/dist/button-card.js $out 38 + 39 + runHook postInstall 40 + ''; 41 + 42 + doDist = false; 43 + 44 + meta = with lib; { 45 + description = "Lovelace button-card for home assistant"; 46 + homepage = "https://github.com/custom-cards/button-card"; 47 + changelog = "https://github.com/custom-cards/button-card/blob/${src.rev}/CHANGELOG.md"; 48 + license = licenses.mit; 49 + maintainers = with maintainers; [ k900 ]; 50 + platforms = platforms.all; 51 + }; 52 + }
+78
pkgs/servers/home-assistant/custom-lovelace-modules/button-card/package.json
···
··· 1 + { 2 + "name": "button-card", 3 + "version": "4.1.2", 4 + "description": "Button card for lovelace", 5 + "main": "dist/button-card.js", 6 + "scripts": { 7 + "build": "npm run lint && npm run rollup", 8 + "rollup": "rollup -c", 9 + "babel": "babel dist/button-card.js --out-file dist/button-card.js", 10 + "lint": "eslint src/*.ts", 11 + "watch": "rollup -c --watch", 12 + "postversion": "npm run build", 13 + "audit-fix": "npx yarn-audit-fix" 14 + }, 15 + "repository": { 16 + "type": "git", 17 + "url": "git+https://github.com/custom-cards/button-card.git" 18 + }, 19 + "keywords": [ 20 + "lovelace" 21 + ], 22 + "author": "kuuji", 23 + "contributors": [ 24 + "Ian Richardson (https://github.com/iantrich)", 25 + "Jérôme Wiedemann (https://github.com/RomRider)" 26 + ], 27 + "license": "MIT", 28 + "bugs": { 29 + "url": "https://github.com/custom-cards/button-card/issues" 30 + }, 31 + "homepage": "https://github.com/custom-cards/button-card#readme", 32 + "devDependencies": { 33 + "@babel/core": "^7.12.3", 34 + "@babel/plugin-proposal-class-properties": "^7.12.1", 35 + "@babel/plugin-proposal-decorators": "^7.12.1", 36 + "@rollup/plugin-babel": "^5.2.1", 37 + "@rollup/plugin-commonjs": "^16.0.0", 38 + "@rollup/plugin-json": "^4.0.2", 39 + "@rollup/plugin-node-resolve": "^10.0.0", 40 + "@semantic-release/changelog": "^5.0.1", 41 + "@semantic-release/commit-analyzer": "^8.0.1", 42 + "@semantic-release/exec": "^5.0.0", 43 + "@semantic-release/git": "^9.0.0", 44 + "@semantic-release/npm": "^7.0.10", 45 + "@semantic-release/release-notes-generator": "^9.0.1", 46 + "@typescript-eslint/eslint-plugin": "^6.1.0", 47 + "@typescript-eslint/parser": "^6.1.0", 48 + "conventional-changelog-conventionalcommits": "^4.5.0", 49 + "eslint": "7.12.1", 50 + "eslint-config-airbnb-base": "^14.1.0", 51 + "eslint-config-prettier": "^6.15.0", 52 + "eslint-plugin-import": "^2.22.1", 53 + "eslint-plugin-prettier": "^3.1.2", 54 + "npm": "^6.14.3", 55 + "prettier": "^2.1.2", 56 + "prettier-eslint": "^11.0.0", 57 + "rollup": "^2.33.1", 58 + "rollup-plugin-cleanup": "^3.2.1", 59 + "rollup-plugin-serve": "^1.1.0", 60 + "rollup-plugin-terser": "^7.0.2", 61 + "rollup-plugin-typescript2": "^0.29.0", 62 + "semantic-release": "^17.3.8", 63 + "ts-lit-plugin": "^1.1.10", 64 + "typescript": "^4.0.5", 65 + "typescript-styled-plugin": "^0.15.0", 66 + "yarn-audit-fix": "^9.3.10" 67 + }, 68 + "dependencies": { 69 + "@ctrl/tinycolor": "^3.1.6", 70 + "@material/mwc-ripple": "^0.19.1", 71 + "fast-copy": "^2.1.0", 72 + "home-assistant-js-websocket": "^8.2.0", 73 + "lit": "^2.7.6", 74 + "lit-element": "^3.3.2", 75 + "lit-html": "^2.7.5", 76 + "memoize-one": "^6.0.0" 77 + } 78 + }
+37
pkgs/servers/home-assistant/custom-lovelace-modules/card-mod/default.nix
···
··· 1 + { lib 2 + , buildNpmPackage 3 + , fetchFromGitHub 4 + }: 5 + 6 + buildNpmPackage rec { 7 + pname = "lovelace-card-mod"; 8 + version = "3.4.3"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "thomasloven"; 12 + repo = "lovelace-card-mod"; 13 + rev = "v${version}"; 14 + hash = "sha256-LFKOTu0SBeHpf8Hjvsgc/xOUux9d4lBCshdD9u7eO5o="; 15 + }; 16 + 17 + npmDepsHash = "sha256-JJexFmVbDHi2JCiCpcDupzVf0xfwy+vqWILq/dLVcBo="; 18 + 19 + installPhase = '' 20 + runHook preInstall 21 + 22 + mkdir $out 23 + cp card-mod.js $out 24 + 25 + runHook postInstall 26 + ''; 27 + 28 + passthru.entrypoint = "card-mod.js"; 29 + 30 + meta = with lib; { 31 + description = "Add CSS styles to (almost) any lovelace card"; 32 + homepage = "https://github.com/thomasloven/lovelace-card-mod"; 33 + license = licenses.mit; 34 + maintainers = with maintainers; [ k900 ]; 35 + platforms = platforms.all; 36 + }; 37 + }
+36
pkgs/servers/home-assistant/custom-lovelace-modules/decluttering-card/default.nix
···
··· 1 + { lib 2 + , buildNpmPackage 3 + , fetchFromGitHub 4 + }: 5 + 6 + buildNpmPackage rec { 7 + pname = "decluttering-card"; 8 + version = "1.0.0"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "custom-cards"; 12 + repo = "decluttering-card"; 13 + rev = "v${version}"; 14 + hash = "sha256-8pf7G6RbLdpIdXYz801+wwAc3NcNs8l0x4fSGqlAmG0="; 15 + }; 16 + 17 + npmDepsHash = "sha256-9tmEfKo8n2LR+r40hEqOfn7w6/P29XQ+KZSHL97wUuY="; 18 + 19 + installPhase = '' 20 + runHook preInstall 21 + 22 + mkdir $out 23 + cp dist/decluttering-card.js $out 24 + 25 + runHook postInstall 26 + ''; 27 + 28 + meta = with lib; { 29 + description = "Declutter your lovelace configuration with the help of this card"; 30 + homepage = "https://github.com/custom-cards/decluttering-card"; 31 + changelog = "https://github.com/custom-cards/decluttering-card/blob/${src.rev}/CHANGELOG.md"; 32 + license = licenses.mit; 33 + maintainers = with maintainers; [ k900 ]; 34 + platforms = platforms.all; 35 + }; 36 + }
+12
pkgs/servers/home-assistant/custom-lovelace-modules/default.nix
··· 2 }: 3 4 { 5 light-entity-card = callPackage ./light-entity-card { }; 6 7 mini-graph-card = callPackage ./mini-graph-card {}; ··· 11 multiple-entity-row = callPackage ./multiple-entity-row { }; 12 13 mushroom = callPackage ./mushroom { }; 14 15 zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; 16 }
··· 2 }: 3 4 { 5 + android-tv-card = callPackage ./android-tv-card { }; 6 + 7 + button-card = callPackage ./button-card { }; 8 + 9 + card-mod = callPackage ./card-mod { }; 10 + 11 + decluttering-card = callPackage ./decluttering-card { }; 12 + 13 + lg-webos-remote-control = callPackage ./lg-webos-remote-control { }; 14 + 15 light-entity-card = callPackage ./light-entity-card { }; 16 17 mini-graph-card = callPackage ./mini-graph-card {}; ··· 21 multiple-entity-row = callPackage ./multiple-entity-row { }; 22 23 mushroom = callPackage ./mushroom { }; 24 + 25 + valetudo-map-card = callPackage ./valetudo-map-card { }; 26 27 zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; 28 }
+37
pkgs/servers/home-assistant/custom-lovelace-modules/lg-webos-remote-control/default.nix
···
··· 1 + { lib 2 + , buildNpmPackage 3 + , fetchFromGitHub 4 + }: 5 + 6 + buildNpmPackage rec { 7 + pname = "lg-webos-remote-control"; 8 + version = "2.0.3"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "madmicio"; 12 + repo = "LG-WebOS-Remote-Control"; 13 + rev = version; 14 + hash = "sha256-ICOAi8q8dWrBFCv18JYSWc6MIwqxfDXOcc6kCKLGehs="; 15 + }; 16 + 17 + npmDepsHash = "sha256-kN+i0ic1JWs6kqnAliiO4yVMDXwfZaQsRGKeV9A0MxE="; 18 + 19 + installPhase = '' 20 + runHook preInstall 21 + 22 + mkdir $out 23 + cp dist/lg-remote-control.js $out 24 + 25 + runHook postInstall 26 + ''; 27 + 28 + passthru.entrypoint = "lg-remote-control.js"; 29 + 30 + meta = with lib; { 31 + description = "Remote Control for LG TV WebOS"; 32 + homepage = "https://github.com/madmicio/LG-WebOS-Remote-Control"; 33 + license = licenses.mit; 34 + maintainers = with maintainers; [ k900 ]; 35 + platforms = platforms.all; 36 + }; 37 + }
+39
pkgs/servers/home-assistant/custom-lovelace-modules/valetudo-map-card/default.nix
···
··· 1 + { lib 2 + , buildNpmPackage 3 + , fetchFromGitHub 4 + }: 5 + 6 + buildNpmPackage rec { 7 + pname = "lovelace-valetudo-map-card"; 8 + version = "2023.04.0"; 9 + 10 + src = fetchFromGitHub { 11 + owner = "Hypfer"; 12 + repo = "lovelace-valetudo-map-card"; 13 + rev = "v${version}"; 14 + hash = "sha256-owOIbA1tRlnbWJ/p/wAUpeDnz/Wzu+GmUammJ6VFxHc="; 15 + }; 16 + 17 + patches = [ ./remove-git-dependency.patch ]; 18 + 19 + npmDepsHash = "sha256-xHHbOt9HW+zJAhHEDy2V5eYyLv4e3OrUbnzqeJasSng="; 20 + 21 + installPhase = '' 22 + runHook preInstall 23 + 24 + mkdir $out 25 + cp dist/valetudo-map-card.js $out 26 + 27 + runHook postInstall 28 + ''; 29 + 30 + passthru.entrypoint = "valetudo-map-card.js"; 31 + 32 + meta = with lib; { 33 + description = "Display the map from a valetudo-enabled robot in a home assistant dashboard card"; 34 + homepage = "https://github.com/Hypfer/lovelace-valetudo-map-card"; 35 + license = licenses.mit; 36 + maintainers = with maintainers; [ k900 ]; 37 + platforms = platforms.all; 38 + }; 39 + }
+64
pkgs/servers/home-assistant/custom-lovelace-modules/valetudo-map-card/remove-git-dependency.patch
···
··· 1 + diff --git a/package-lock.json b/package-lock.json 2 + index cce05ba..36020f8 100644 3 + --- a/package-lock.json 4 + +++ b/package-lock.json 5 + @@ -1,12 +1,12 @@ 6 + { 7 + "name": "lovelace-valetudo-map-card", 8 + - "version": "2022.08.0", 9 + + "version": "2023.04.0", 10 + "lockfileVersion": 2, 11 + "requires": true, 12 + "packages": { 13 + "": { 14 + "name": "lovelace-valetudo-map-card", 15 + - "version": "2022.08.0", 16 + + "version": "2023.04.0", 17 + "license": "MIT", 18 + "dependencies": { 19 + "custom-card-helpers": "1.9.0" 20 + @@ -21,7 +21,6 @@ 21 + "eslint-plugin-jsdoc": "39.3.0", 22 + "eslint-plugin-regexp": "1.7.0", 23 + "eslint-plugin-sort-keys-fix": "1.1.2", 24 + - "eslint-plugin-sort-requires": "git+https://npm@github.com/Hypfer/eslint-plugin-sort-requires.git#2.1.1", 25 + "pako": "2.0.4", 26 + "rollup": "2.58.0", 27 + "rollup-plugin-babel": "4.4.0", 28 + @@ -1596,12 +1595,6 @@ 29 + "node": ">=6.0.0" 30 + } 31 + }, 32 + - "node_modules/eslint-plugin-sort-requires": { 33 + - "version": "2.1.0", 34 + - "resolved": "git+https://npm@github.com/Hypfer/eslint-plugin-sort-requires.git#3e216dd9e9589b87671a3e7bf4084a0bd96e920e", 35 + - "dev": true, 36 + - "license": "MIT" 37 + - }, 38 + "node_modules/eslint-scope": { 39 + "version": "7.1.1", 40 + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", 41 + @@ -4358,11 +4351,6 @@ 42 + } 43 + } 44 + }, 45 + - "eslint-plugin-sort-requires": { 46 + - "version": "git+https://npm@github.com/Hypfer/eslint-plugin-sort-requires.git#3e216dd9e9589b87671a3e7bf4084a0bd96e920e", 47 + - "dev": true, 48 + - "from": "eslint-plugin-sort-requires@git+https://npm@github.com/Hypfer/eslint-plugin-sort-requires.git#2.1.1" 49 + - }, 50 + "eslint-scope": { 51 + "version": "7.1.1", 52 + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", 53 + diff --git a/package.json b/package.json 54 + index 85a9d35..d8c6865 100644 55 + --- a/package.json 56 + +++ b/package.json 57 + @@ -23,7 +23,6 @@ 58 + "eslint-plugin-jsdoc": "39.3.0", 59 + "eslint-plugin-regexp": "1.7.0", 60 + "eslint-plugin-sort-keys-fix": "1.1.2", 61 + - "eslint-plugin-sort-requires": "git+https://npm@github.com/Hypfer/eslint-plugin-sort-requires.git#2.1.1", 62 + "@typescript-eslint/eslint-plugin": "5.25.0", 63 + "@typescript-eslint/experimental-utils": "5.25.0", 64 + "@typescript-eslint/parser": "5.25.0",