diff --git a/Dockerfile b/Dockerfile index ddad334..84cd3a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,9 @@ -FROM python:3.11-slim +FROM ghcr.io/home-assistant/home-assistant:stable -WORKDIR /app - -# Python deps first so layer cache survives code changes -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -# Application code -COPY main.py . -COPY samsung_appliance/ ./samsung_appliance/ - -# /config holds the ab0b0ac4 client cert + key. Mount from the host so -# secrets aren't baked into the image. -RUN mkdir -p /config - -# Unbuffered stdout so docker logs is live -ENV PYTHONUNBUFFERED=1 - -# Defaults — override in .env or `docker run -e …`. Per-appliance -# keys (APPLIANCE_COUNT, APPLIANCE__*) have no universal default -# and must be set in .env. -ENV CERT_PATH=/config/ab0b0ac4_fullchain.pem \ - KEY_PATH=/config/ab0b0ac4.key \ - HA_DISCOVERY_PREFIX=homeassistant \ - HEALTH_INTERVAL_S=60 \ - HEARTBEAT_INTERVAL_S=600 - -# No port — bridge is outbound-only (DTLS UDP to appliance, MQTT to broker). - -CMD ["python", "main.py"] +# Home Assistant normally installs a custom integration's manifest.json +# requirements itself at integration setup, but that depends on the +# container having outbound network access at exactly that moment and +# repeats the install attempt on every container recreate. Baking +# smartthings-local into the image keeps the dev container usable +# offline and avoids relying on that runtime install path. +RUN pip3 install --no-cache-dir "smartthings-local>=0.1.0" diff --git a/README.md b/README.md index f270e5a..5e3f888 100644 --- a/README.md +++ b/README.md @@ -76,11 +76,13 @@ Entities appear under one HA device per appliance, named `Samsung Appliance (