home-assistant: refresh custom-components and custom-lovelace-modules (#364426)

This commit is contained in:
Martin Weinelt 2024-12-12 04:10:03 +01:00 committed by GitHub
commit 6e1432be8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
61 changed files with 2388 additions and 168 deletions

View File

@ -17,14 +17,14 @@
buildPythonPackage rec {
pname = "msmart-ng";
version = "2024.9.0";
version = "2024.12.0";
pyproject = true;
src = fetchFromGitHub {
owner = "mill1000";
repo = "midea-msmart";
rev = version;
hash = "sha256-djo+sINurnrt0GO8045bgNstjh+yl+CE2GJ1vWivAqY=";
hash = "sha256-0Eh7QgR3IbTVa4kZ/7mtdmghFJLKOHpUawjMAoVuNoo=";
};
build-system = [

View File

@ -1,19 +1,31 @@
#!/usr/bin/env python3
import argparse
import json
import os
import sys
import importlib_metadata
import importlib.metadata
from typing import Dict, List
from packaging.requirements import InvalidRequirement, Requirement
def error(msg: str, ret: bool = False) -> None:
def error(msg: str, ret: bool = False) -> bool:
print(f" - {msg}", file=sys.stderr)
return ret
def check_requirement(req: str):
def check_derivation_name(manifest: Dict) -> bool:
derivation_domain = os.environ.get("domain")
manifest_domain = manifest["domain"]
if derivation_domain != manifest_domain:
return error(
f"Derivation attribute domain ({derivation_domain}) should match manifest domain ({manifest_domain})"
)
return True
def test_requirement(req: str, ignore_version_requirement: List[str]) -> bool:
# https://packaging.pypa.io/en/stable/requirements.html
try:
requirement = Requirement(req)
@ -21,44 +33,55 @@ def check_requirement(req: str):
return error(f"{req} could not be parsed", ret=True)
try:
version = importlib_metadata.distribution(requirement.name).version
except importlib_metadata.PackageNotFoundError:
return error(f"{requirement.name}{requirement.specifier} not present")
version = importlib.metadata.distribution(requirement.name).version
except importlib.metadata.PackageNotFoundError:
return error(f"{requirement.name}{requirement.specifier} not installed")
# https://packaging.pypa.io/en/stable/specifiers.html
if version not in requirement.specifier:
if (
requirement.name not in ignore_version_requirement
and version not in requirement.specifier
):
return error(
f"{requirement.name}{requirement.specifier} expected, but got {version}"
f"{requirement.name}{requirement.specifier} not satisfied by version {version}"
)
return True
def check_manifest(manifest_file: str):
with open(manifest_file) as fd:
manifest = json.load(fd)
def check_requirements(manifest: Dict, ignore_version_requirement: List[str]):
ok = True
derivation_domain = os.environ.get("domain")
manifest_domain = manifest["domain"]
if derivation_domain != manifest_domain:
ok = False
error(
f"Derivation attribute domain ({derivation_domain}) must match manifest domain ({manifest_domain})"
)
for requirement in manifest.get("requirements", []):
ok &= test_requirement(requirement, ignore_version_requirement)
if "requirements" in manifest:
for requirement in manifest["requirements"]:
ok &= check_requirement(requirement)
return ok
def main(args):
ok = True
manifests = []
for fd in args.manifests:
manifests.append(json.load(fd))
# At least one manifest should match the component name
ok &= any(check_derivation_name(manifest) for manifest in manifests)
# All requirements need to match, use `ignoreRequirementVersion` to ignore too strict version constraints
ok &= all(
check_requirements(manifest, args.ignore_version_requirement)
for manifest in manifests
)
if not ok:
error("Manifest check failed.")
sys.exit(1)
if __name__ == "__main__":
if len(sys.argv) < 2:
raise RuntimeError(f"Usage {sys.argv[0]} <manifest>")
manifest_file = sys.argv[1]
check_manifest(manifest_file)
parser = argparse.ArgumentParser()
parser.add_argument("manifests", type=argparse.FileType("r"), nargs="+")
parser.add_argument("--ignore-version-requirement", action="append", default=[])
args = parser.parse_args()
main(args)

View File

@ -1,5 +1,4 @@
{
lib,
home-assistant,
makeSetupHook,
}:
@ -21,16 +20,27 @@ in
home-assistant.python.pkgs.buildPythonPackage (
{
pname = "${owner}/${domain}";
inherit format;
inherit version format;
buildPhase = ''
true
'';
installPhase = ''
runHook preInstall
mkdir $out
cp -r ./custom_components/ $out/
if [[ -f ./manifest.json ]]; then
mkdir $out/custom_components
cp -R $(realpath .) $out/custom_components/
else
cp -r ./custom_components/ $out/
fi
# optionally copy sentences, if they exist
cp -r ./custom_sentences/ $out/ || true
if [[ -d ./custom_sentences ]]; then
cp -r ./custom_sentences/ $out/
fi
runHook postInstall
'';
@ -38,7 +48,6 @@ home-assistant.python.pkgs.buildPythonPackage (
nativeCheckInputs =
with home-assistant.python.pkgs;
[
importlib-metadata
manifestRequirementsCheckHook
packaging
]

View File

@ -4,7 +4,7 @@
}:
makeSetupHook {
name = "manifest-requirements-check-hook";
name = "manifest-check-hook";
substitutions = {
pythonCheckInterpreter = python.interpreter;
checkManifest = ./check_manifest.py;

View File

@ -1,17 +1,28 @@
# shellcheck shell=bash
# Setup hook to check HA manifest requirements
echo "Sourcing manifest-requirements-check-hook"
echo "Sourcing manifest-check-hook"
function manifestCheckPhase() {
echo "Executing manifestCheckPhase"
runHook preCheck
manifests=$(shopt -s nullglob; echo $out/custom_components/*/manifest.json)
args=""
# shellcheck disable=SC2154
for package in "${ignoreVersionRequirement[@]}"; do
args+=" --ignore-version-requirement ${package}"
done
if [ ! -z "$manifests" ]; then
echo Checking manifests $manifests
@pythonCheckInterpreter@ @checkManifest@ $manifests
readarray -d '' manifests < <(find . -type f -name "manifest.json" -print0)
if [ "${#manifests[@]}" -gt 0 ]; then
# shellcheck disable=SC2068
echo Checking manifests ${manifests[@]}
# shellcheck disable=SC2068,SC2086
@pythonCheckInterpreter@ @checkManifest@ ${manifests[@]} $args
else
echo "No custom component manifests found in $out" >&2
# shellcheck disable=SC2154
echo "No component manifests found in $out" >&2
exit 1
fi

View File

@ -8,7 +8,7 @@ It builds upon `buildPythonPackage` but uses a custom install and check
phase.
Python runtime dependencies can be directly consumed as unqualified
function arguments. Pass them into `propagatedBuildInputs`, for them to
function arguments. Pass them into `dependencies`, for them to
be available to Home Assistant.
Out-of-tree components need to use Python packages from
@ -31,7 +31,7 @@ buildHomeAssistantComponent {
# owner, repo, rev, hash
};
propagatedBuildInputs = [
dependencies = [
# python requirements, as specified in manifest.json
];
@ -72,3 +72,21 @@ and manifest agree about the domain name.
There shouldn't be a need to disable this hook, but you can set
`dontCheckManifest` to `true` in the derivation to achieve that.
### Too narrow version constraints
Every once in a while a dependency constraint is more narrow than it
needs to be. Instead of applying brittle substitions the version constraint
can be ignored on a per requirement basis.
```nix
dependencies = [
pyemvue
];
# don't check the version constraint of pyemvue
ignoreVersionRequirement = [
"pyemvue"
];
```
`

View File

@ -17,7 +17,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-Yq8mKk2j2CHyHvwyej0GeFQhuy1MFXwt0o+lDOGwrBU=";
};
propagatedBuildInputs = [
dependencies = [
ulid-transform
];

View File

@ -7,20 +7,19 @@
buildHomeAssistantComponent rec {
owner = "nielsfaber";
domain = "alarmo";
version = "1.10.4";
postInstall = ''
cd $out/custom_components/alarmo/frontend
ls . | grep -v dist | xargs rm -rf
'';
version = "1.10.7";
src = fetchFromGitHub {
owner = "nielsfaber";
repo = "alarmo";
rev = "refs/tags/v${version}";
hash = "sha256-/hNzGPckLHUX0mrBF3ugAXstrOc1mWdati+nRJCwldc=";
hash = "sha256-EFR8GveMNpwhrIA0nP+Ny3YUTHAOFw+IF72hH1+wMSM=";
};
postPatch = ''
find ./custom_components/alarmo/frontend -mindepth 1 -maxdepth 1 ! -name "dist" -exec rm -rf {} \;
'';
meta = with lib; {
changelog = "https://github.com/nielsfaber/alarmo/releases/tag/v${version}";
description = "Alarm System for Home Assistant";

View File

@ -7,19 +7,17 @@
buildHomeAssistantComponent rec {
owner = "BeryJu";
domain = "auth_header";
version = "1.10-unstable-2024-02-26";
version = "1.11";
src = fetchFromGitHub {
inherit owner;
repo = "hass-auth-header";
rev = "5923cb33b57a9d3c23513d54cc74b02ebd243409";
hash = "sha256-ZYd1EduzoljaY3OnpjsKEAwtf03435zJmZtgqzbdjjA=";
tag = "v${version}";
hash = "sha256-N2jEFyb/OWsO48rAuQBDHtQ5yKfIrGTcwlEb2P3LyVc=";
};
# build step just runs linter
dontBuild = true;
meta = with lib; {
changelog = "https://github.com/BeryJu/hass-auth-header/releases/tag/v${version}";
description = "Home Assistant custom component which allows you to delegate authentication to a reverse proxy";
homepage = "https://github.com/BeryJu/hass-auth-header";
maintainers = with maintainers; [ mjm ];

View File

@ -7,16 +7,21 @@
buildHomeAssistantComponent rec {
owner = "Limych";
domain = "average";
version = "2.3.4";
version = "2.4.0";
src = fetchFromGitHub {
inherit owner;
repo = "ha-average";
rev = version;
hash = "sha256-PfN2F1/ScVScXfh5jKQDZ6rK4XlqD9+YW8k4f4i3bk0=";
tag = version;
hash = "sha256-LISGpgfoVxdOeJ9LHzxf7zt49pbIJrLiPkNg/Mf1lxM=";
};
postPatch = ''
sed -i "/pip>=/d" custom_components/average/manifest.json
'';
meta = with lib; {
changelog = "https://github.com/Limych/ha-average/releases/tag/${version}";
description = "Average Sensor for Home Assistant";
homepage = "https://github.com/Limych/ha-average";
maintainers = with maintainers; [ matthiasbeyer ];

View File

@ -8,16 +8,17 @@
buildHomeAssistantComponent rec {
owner = "10der";
domain = "awtrix";
version = "unstable-2024-05-26";
version = "0.3.21";
src = fetchFromGitHub {
inherit owner;
repo = "homeassistant-custom_components-awtrix";
rev = "329d8eec28478574b9f34778f96b5768f30be2ab";
hash = "sha256-ucSaQWMS6ZwXHnw5Ct/STxpl1JjBRua3edrLvBAsdyw=";
# https://github.com/10der/homeassistant-custom_components-awtrix/issues/9
rev = "8180cef7b1837e85115ef7ece553e39b0f94ff4d";
hash = "sha256-D/RXi7nX+xqFs5Dvu1pwomQWCJ8PJhc1H3wsAgBhRMQ=";
};
propagatedBuildInputs = [
dependencies = [
requests
];

View File

@ -18,14 +18,14 @@ buildHomeAssistantComponent rec {
hash = "sha256-6bYKqU9yucISjTrmCUx1bNn9kqvT9jW1OBrqAa4ayEQ=";
};
postPatch = ''
substituteInPlace custom_components/bodymiscale/manifest.json --replace-fail 'cachetools==5.3.0' 'cachetools>=5.3.0'
'';
propagatedBuildInputs = [
dependencies = [
cachetools
];
ignoreVersionRequirement = [
"cachetools"
];
meta = {
description = "Home Assistant custom component providing body metrics for Xiaomi Mi Scale 1 and 2";
homepage = "https://github.com/dckiller51/bodymiscale";

View File

@ -7,13 +7,13 @@
buildHomeAssistantComponent rec {
owner = "carleeno";
domain = "elevenlabs_tts";
version = "2.3.0";
version = "2.4.0";
src = fetchFromGitHub {
owner = "carleeno";
repo = "elevenlabs_tts";
rev = "refs/tags/${version}";
hash = "sha256-7/Di3K7b0IzxatqBXqgVeMziRwalOVmIJ5IuEWJVjkE=";
hash = "sha256-/hszK5J1iGB46WfmCCK9/F0JOR405gplMwVC4niAqig=";
};
meta = with lib; {

View File

@ -6,24 +6,24 @@
}:
buildHomeAssistantComponent rec {
owner = "presto8";
owner = "magico13";
domain = "emporia_vue";
version = "0.8.3";
version = "0.10.0";
src = fetchFromGitHub {
owner = "magico13";
repo = "ha-emporia-vue";
rev = "v${version}";
hash = "sha256-6NrRuBjpulT66pVUfW9ujULL5HSzfgyic1pKEBRupNA=";
hash = "sha256-bUfFRcVu/i6yp9BbfM3d6J8TBT3X35HNk0tr00JIwC8=";
};
propagatedBuildInputs = [
dependencies = [
pyemvue
];
postPatch = ''
substituteInPlace custom_components/emporia_vue/manifest.json --replace-fail 'pyemvue==0.17.1' 'pyemvue>=0.17.1'
'';
ignoreVersionRequirement = [
"pyemvue"
];
dontBuild = true;

View File

@ -17,7 +17,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-PY3udPgvsaXdDRh4+NQmVlqhERswcMpaJTq5azaUFf4=";
};
propagatedBuildInputs = [
dependencies = [
beautifulsoup4
];

View File

@ -8,13 +8,13 @@
buildHomeAssistantComponent rec {
owner = "blakeblackshear";
domain = "frigate";
version = "5.3.0";
version = "5.4.0";
src = fetchFromGitHub {
owner = "blakeblackshear";
repo = "frigate-hass-integration";
rev = "v${version}";
hash = "sha256-0eTEgRDgm4+Om2uqrt24Gj7dSdA6OJs/0oi5J5SHOyI=";
hash = "sha256-V2Y+xUAA/Lu7u82WUlUI5CFi9SGWe6ocVQtlXeVg2ZA=";
};
dependencies = [ pytz ];

View File

@ -9,7 +9,7 @@
buildHomeAssistantComponent {
owner = "cyberjunky";
domain = "garmin_connect";
version = "unstable-2024-08-31";
version = "0.2.22";
src = fetchFromGitHub {
owner = "cyberjunky";
@ -18,7 +18,7 @@ buildHomeAssistantComponent {
hash = "sha256-KqbP6TpH9B0/AjtsW5TcWSNgUhND+w8rO6X8fHqtsDI=";
};
propagatedBuildInputs = [
dependencies = [
garminconnect
tzlocal
];

View File

@ -30,7 +30,7 @@ buildHomeAssistantComponent {
dontBuild = true;
propagatedBuildInputs = [
dependencies = [
govee-led-wez
];

View File

@ -18,7 +18,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-JyyJPI0lbZLJj+016WgS1KXU5rnxUmRMafel4/wKsYk=";
};
propagatedBuildInputs = [ libgpiod ];
dependencies = [ libgpiod ];
meta = with lib; {
description = "Home Assistant GPIO custom integration";

View File

@ -8,13 +8,13 @@
buildHomeAssistantComponent rec {
owner = "sander1988";
domain = "indego";
version = "5.7.4";
version = "5.7.8";
src = fetchFromGitHub {
owner = "sander1988";
repo = "Indego";
rev = "refs/tags/${version}";
hash = "sha256-SiYjducy0NP5bF3STVzhBdnJraNjHywHfD7OmAnYmr0=";
hash = "sha256-7PQUsSPS+o5Vt4Do4/TXyGXAqyHJg96w8n7UMpZ0uFo=";
};
dependencies = [ pyindego ];

View File

@ -17,7 +17,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-Fl8qwsW9NdjnYdu7IGQDelXTLqNx5ioUoxkhv+p5L0I=";
};
propagatedBuildInputs = [ midea-beautiful-air ];
dependencies = [ midea-beautiful-air ];
meta = with lib; {
description = "Home Assistant custom component adding support for controlling Midea air conditioners and dehumidifiers on local network";

View File

@ -8,13 +8,13 @@
buildHomeAssistantComponent rec {
owner = "mill1000";
domain = "midea_ac";
version = "2024.9.2";
version = "2024.10.4";
src = fetchFromGitHub {
owner = "mill1000";
repo = "midea-ac-py";
rev = version;
hash = "sha256-PVR3yuyWMilmyOS341pS73c9ocOrFfJ9dwiKEYqCtM4=";
hash = "sha256-P/s8HMP9xQWI+bgy6JHe4pAx+jItpK6BCWIyKsfTjmg=";
};
dependencies = [ msmart-ng ];

View File

@ -17,7 +17,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-LGpCT0a6mxbf0W6ucTIBhl9aNUd5/1dUk6M+CzRKuoU=";
};
propagatedBuildInputs = [
dependencies = [
moonraker-api
];

View File

@ -17,7 +17,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-OGCAJsAsnUjwaLR8lCBdU+ghVOGFF0mT73t5JtcngUA=";
};
propagatedBuildInputs = [
dependencies = [
requests
];

View File

@ -17,7 +17,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-O1NxT7u27xLydPqEqH72laU0tlYVrMPo0TwWIVNJ+0Q=";
};
propagatedBuildInputs = [
dependencies = [
omnikinverter
];

View File

@ -19,15 +19,15 @@ buildHomeAssistantComponent rec {
hash = "sha256-yoaph/R3c4j+sXEC02Hv+ixtuif70/y6Gag5NBpKFLs=";
};
postPatch = ''
substituteInPlace custom_components/philips_airpurifier_coap/manifest.json --replace-fail 'getmac==0.9.4' 'getmac>=0.9.4'
'';
dependencies = [
aioairctrl
getmac
];
ignoreVersionRequirement = [
"getmac"
];
meta = {
description = "Philips AirPurifier custom component for Home Assistant";
homepage = "https://github.com/kongo09/philips-airpurifier-coap";

View File

@ -7,16 +7,16 @@
buildHomeAssistantComponent rec {
owner = "iprak";
domain = "sensi";
version = "1.3.4";
version = "1.3.14";
src = fetchFromGitHub {
inherit owner;
repo = domain;
rev = "refs/tags/v${version}";
hash = "sha256-NbK9h0nvcWNSwsc04YgjqKl+InijxftPJ3SLCQF/Hns=";
hash = "sha256-kskffpfxpUjNUgsGc/sSkCbGdjt47KfPpH6KBFDLsHw=";
};
propagatedBuildInputs = [
dependencies = [
websockets
];

View File

@ -29,7 +29,7 @@ buildHomeAssistantComponent rec {
})
];
propagatedBuildInputs = [
dependencies = [
aiofiles
broadlink
];

View File

@ -19,7 +19,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-mcxXBnVGrlVxbSi+IwmGJiWqy5PlQmHQl+hgW6i7NFc=";
};
propagatedBuildInputs = [
dependencies = [
charset-normalizer
pycountry
xmltodict

View File

@ -10,13 +10,13 @@
buildHomeAssistantComponent rec {
owner = "frenck";
domain = "spook";
version = "3.0.1";
version = "3.1.0";
src = fetchFromGitHub {
inherit owner;
repo = domain;
rev = "refs/tags/v${version}";
hash = "sha256-ChHsevryWuim8BEFqXVkCOW9fGMrt5vol+B2SreMUws=";
hash = "sha256-IV3n++uFSOvQANPfbCeBj3GP0CCL+w9icKp/k5VO3Qg=";
};
patches = [ ./remove-sub-integration-symlink-hack.patch ];

View File

@ -11,13 +11,13 @@
buildHomeAssistantComponent rec {
owner = "make-all";
domain = "tuya_local";
version = "2024.8.0";
version = "2024.11.4";
src = fetchFromGitHub {
inherit owner;
repo = "tuya-local";
rev = "refs/tags/${version}";
hash = "sha256-IHTWcNxmNXJk7SNnrLNFbaXJQSg6VYkAgAVmyt3JmRw=";
hash = "sha256-Mmcq0GBWiE6IWUVL6q9lw29wKEymAQn439/pOSqWgdQ=";
};
dependencies = [

View File

@ -9,13 +9,13 @@
buildHomeAssistantComponent rec {
owner = "mitch-dc";
domain = "volkswagen_we-connect_id";
version = "0.2.0";
version = "0.2.3";
src = fetchFromGitHub {
inherit owner;
repo = "volkswagen_we_connect_id";
rev = "refs/tags/v${version}";
hash = "sha256-Pmx1jXWXYta/kY51Ih1YRB+QeIfklVvBKcUYU5bHbsQ=";
hash = "sha256-hok1ICAHMfvfMucBYkgWD68Tsn9E33Z/ouoRwFqHHF4=";
};
dependencies = [

View File

@ -13,13 +13,13 @@
buildHomeAssistantComponent rec {
owner = "mampfes";
domain = "waste_collection_schedule";
version = "2.4.0";
version = "2.5.0";
src = fetchFromGitHub {
inherit owner;
repo = "hacs_waste_collection_schedule";
rev = "refs/tags/${version}";
hash = "sha256-2WUwUifRCIhz+QmhpY8VGx/USEImpPX0K511xDJWP1I=";
hash = "sha256-8AUaVcVCZ+WCLrmEQhIEohEWmeG6g7t3EjVdF9FUyJQ=";
};
dependencies = [

View File

@ -18,7 +18,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-0tLyRQ5KIL3NDAKK8nr8ZrgN/uh8YdGA7iSNJwEIxis=";
};
propagatedBuildInputs = [ zigpy ];
dependencies = [ zigpy ];
dontBuild = true;

View File

@ -11,13 +11,13 @@
buildHomeAssistantComponent rec {
owner = "al-one";
domain = "xiaomi_miot";
version = "0.7.23";
version = "1.0.2";
src = fetchFromGitHub {
owner = "al-one";
repo = "hass-xiaomi-miot";
rev = "v${version}";
hash = "sha256-PTjkKuK+DAOmKREr0AHjFXzy4ktguD4ZOHcWuLedLH0=";
hash = "sha256-WoPzWCraTj0VNzwZT9IpK7Loc1OuoQf/2B++SwP7f0Y=";
};
dependencies = [

View File

@ -17,7 +17,7 @@ buildHomeAssistantComponent rec {
hash = "sha256-uhyUQebAx4g1PT/urbyx8EZNFE9vIY0bUAKmgCwY3aQ=";
};
propagatedBuildInputs = [ pysmartthings ];
dependencies = [ pysmartthings ];
meta = with lib; {
description = "HomeAssistant integration for Samsung Soundbars";

View File

@ -1,52 +0,0 @@
{
lib,
pkgs,
callPackage,
}:
{
apexcharts-card = callPackage ./apexcharts-card { };
atomic-calendar-revive = callPackage ./atomic-calendar-revive { };
bubble-card = callPackage ./bubble-card { };
button-card = callPackage ./button-card { };
card-mod = callPackage ./card-mod { };
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 { };
mini-graph-card = callPackage ./mini-graph-card { };
mini-media-player = callPackage ./mini-media-player { };
multiple-entity-row = callPackage ./multiple-entity-row { };
mushroom = callPackage ./mushroom { };
rmv-card = callPackage ./rmv-card { };
sankey-chart = callPackage ./sankey-chart { };
template-entity-row = callPackage ./template-entity-row { };
universal-remote-card = callPackage ./universal-remote-card { };
vacuum-card = callPackage ./vacuum-card { };
valetudo-map-card = callPackage ./valetudo-map-card { };
weather-card = callPackage ./weather-card { };
zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { };
}
// lib.optionalAttrs pkgs.config.allowAliases {
android-tv-card = lib.warnOnInstantiate "`home-assistant-custom-lovelace-modules.android-tv-card` has been renamed to `universal-remote-card`" pkgs.home-assistant-custom-lovelace-modules.universal-remote-card;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
fetchNpmDeps,
}:
buildNpmPackage rec {
pname = "weather-chart-card";
version = "2.4.11";
src = fetchFromGitHub {
owner = "mlamberts78";
repo = "weather-chart-card";
rev = "V${version}";
hash = "sha256-JF7+XataMdUIGXfonF4XlZGitY9kqKony/U0/yw5jUA=";
};
postPatch = ''
rm -rf dist
ln -s ${./package-lock.json} ./package-lock.json
'';
npmDeps = fetchNpmDeps {
inherit src postPatch;
hash = "sha256-OJF8N7vPLRX0ec5gaQKAxLR227uoeuAU5z+QVNyOeTY=";
};
installPhase = ''
mkdir $out
cp -R dist/* $out/
'';
meta = {
description = "Custom weather card with charts";
homepage = "https://github.com/mlamberts78/weather-chart-card";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
platforms = lib.platforms.all;
};
}

View File

@ -11600,8 +11600,10 @@ with pkgs;
inherit (home-assistant.python.pkgs) callPackage;
directory = ../servers/home-assistant/custom-components;
});
home-assistant-custom-lovelace-modules = lib.recurseIntoAttrs
(callPackage ../servers/home-assistant/custom-lovelace-modules {});
home-assistant-custom-lovelace-modules = lib.recurseIntoAttrs (lib.packagesFromDirectoryRecursive {
inherit callPackage;
directory = ../servers/home-assistant/custom-lovelace-modules;
});
home-assistant-cli = callPackage ../servers/home-assistant/cli.nix { };