diff --git a/Dockerfile b/Dockerfile index a409654..b0a3b0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,9 @@ FROM mcr.microsoft.com/devcontainers/python:1-3.13 SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN \ - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor -o /etc/apt/keyrings/yarn.gpg \ + && echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ bluez \ diff --git a/README.md b/README.md index 389e20d..18e7ea1 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ The default action of the image is to run `container`, which will | `HASS_PASSWORD` | The password of the default user | `dev` | | `LOVELACE_PLUGINS` | List of lovelac plugins to download from github | Empty | | `LOVELACE_LOCAL_FILES` | List of filenames in `/config/www/workspace` to add as lovelace resources | Emtpy | +| `LOVELACE_REMOTE_FILES` | List of full URLs to remotely served lovelace resources to add to lovelace configuration | Empty | ### About Lovelace Plugins The dowload and install of plugins is *very* basic. This is not HACS. @@ -38,6 +39,8 @@ The dowload and install of plugins is *very* basic. This is not HACS. `LOVELACE_LOCAL_FILES` is for the currently worked on plugins and should be a list of file names which are mounted in `/config/www/workspace`. +`LOVELACE_REMOTE_FILES` is for plugins served remotely (e.g. by a local dev server) and should be a space separated list of full URLs including host and port, e.g. `"http://localhost:5000/my-card.js http://localhost:5001/other-card.js"`. The URLs are used as-is in the lovelace resources configuration. + ### Container Script ```bash diff --git a/container b/container index 3eddcba..6fa571e 100755 --- a/container +++ b/container @@ -60,6 +60,11 @@ function install_lovelace_plugins() { plugins="${plugins} /local/workspace/${file}" done + for file in $LOVELACE_REMOTE_FILES + do + plugins="${plugins} ${file}" + done + fetch_lovelace_plugins cat > /config/.storage/lovelace_resources << EOF diff --git a/requirements.txt b/requirements.txt index ee91cec..4ea2071 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -homeassistant==2025.3.4 +homeassistant==2026.2.3