Merge pull request #272403 from mweinelt/lovelace-entrypoint-fix

nixos/home-automation: fix lovelace card entrypoint
This commit is contained in:
Martin Weinelt 2023-12-06 12:19:33 +01:00 committed by GitHub
commit 325eb628b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -75,7 +75,7 @@ let
# Create parts of the lovelace config that reference lovelave modules as resources
customLovelaceModulesResources = {
lovelace.resources = map (card: {
url = "/local/nixos-lovelace-modules/${card.entrypoint or card.pname}.js?${card.version}";
url = "/local/nixos-lovelace-modules/${card.entrypoint or card.pname + ".js"}?${card.version}";
type = "module";
}) cfg.customLovelaceModules;
};

View file

@ -27,7 +27,7 @@ buildNpmPackage rec {
runHook postInstall
'';
passthru.entrypoint = "light-entity-card";
passthru.entrypoint = "light-entity-card.js";
meta = with lib; {
description = "Control any light or switch entity";