Add config options

This commit is contained in:
Jan-Henrik 2023-02-06 22:36:21 +01:00
parent d785fd5a43
commit f56d9dbc47
3 changed files with 14 additions and 6 deletions

View file

@ -1,7 +1,7 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:9.0.1
FROM ${BUILD_FROM}
ADD "https://github.com/jhbruhn/ZBS_Flasher/archive/refs/heads/config_image_format.tar.gz" /src.tar.gz
ADD "https://github.com/jhbruhn/ZBS_Flasher/archive/refs/heads/database_path_config.tar.gz" /src.tar.gz
RUN mkdir /src && tar xvfz /src.tar.gz -C /src --strip-components=1
RUN mv /src/CC2531_station/epaper_station_websocket/ /app

View file

@ -1,6 +1,6 @@
---
name: EPaper Station
version: 1.0.0.2
version: 1.0.0.3
#image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
slug: epaper-station
description: Publish Pictures to EPaper pricetags
@ -10,11 +10,11 @@ arch:
- armv7
- aarch64
options:
serial:
port: ""
serial_port: ""
channel: 25
schema:
serial:
port: str
serial_port: str
channel: "int(11, 25)"
stage: experimental
url: https://github.com/jhbruhn/ZBS_Flasher
hassio_api: true

View file

@ -1,4 +1,12 @@
#!/usr/bin/with-contenv bashio
bashio::log.info "Reading config..."
CONFIG_PATH=/data/options.json
EPS_CHANNEL="$(bashio::config 'channel')"
EPS_PORT="$(bashio::config 'serial_port')"
EPS_IMAGE_WORKDIR="/tmp"
EPS_DATABASE_DIR="/data/database/"
mkdir -p $EPS_DATABASE_DIR
bashio::log.info "Starting epaper station..."
exec python /app/station.py