From 18b9fcaa4900dec84a36a96f36a82b03ef1c390a Mon Sep 17 00:00:00 2001 From: Mihai Ambrosie Date: Sun, 18 Aug 2024 13:49:47 +0300 Subject: [PATCH] Adjust BLACKLIST & WHITELIST Adjust how BLACKLIST & WHITELIST are inserted --- theengsgateway/Dockerfile | 2 +- theengsgateway/config.json | 2 +- theengsgateway/run.sh | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/theengsgateway/Dockerfile b/theengsgateway/Dockerfile index 7125d59..b3e49be 100644 --- a/theengsgateway/Dockerfile +++ b/theengsgateway/Dockerfile @@ -1,6 +1,6 @@ ARG BUILD_FROM FROM $BUILD_FROM -LABEL io.hass.version="1.11.2" io.hass.type="addon" io.hass.arch="armv7|armhf|aarch64|i386|amd64" +LABEL io.hass.version="1.11.3" io.hass.type="addon" io.hass.arch="armv7|armhf|aarch64|i386|amd64" RUN apt-get update && apt-get upgrade -y && \ apt-get install --no-install-recommends -y build-essential bluez python3-pip python3-dev && \ pip3 install --extra-index-url=https://www.piwheels.org/simple TheengsGateway==1.5.0 diff --git a/theengsgateway/config.json b/theengsgateway/config.json index aa5c2de..eb42966 100644 --- a/theengsgateway/config.json +++ b/theengsgateway/config.json @@ -1,6 +1,6 @@ { "name": "TheengsGateway", - "version": "1.11.2", + "version": "1.11.3", "slug": "theengsgw", "description": "TheengsGateway HA Add-on", "url": "https://github.com/mihsu81/addon-theengsgw", diff --git a/theengsgateway/run.sh b/theengsgateway/run.sh index 5112979..f7b7253 100644 --- a/theengsgateway/run.sh +++ b/theengsgateway/run.sh @@ -84,8 +84,6 @@ bashio::log.info "WHITELIST: ${WHITELIST}" echo " \"adapter\": \"${ADAPTER}\"", echo " \"time_sync\": ${TIME_SYNC}", echo " \"time_format\": \"${TIME_FORMAT}\"", - echo " \"blacklist\": \"${BLACKLIST}\"", - echo " \"whitelist\": \"${WHITELIST}\"", echo " \"tls_insecure\": ${TLS_INSECURE}", echo " \"enable_tls\": ${ENABLE_TLS}", echo " \"enable_websocket\": ${ENABLE_WEBSOCKET}" @@ -97,6 +95,14 @@ bashio::log.info "WHITELIST: ${WHITELIST}" if [ -n "${BINDKEYS}" ]; then echo ", \"bindkeys\": ${BINDKEYS}" fi + # Check if BLACKLIST is not empty, then include it + if [ -n "${BLACKLIST}" ]; then + echo ", \"blacklist\": ${BLACKLIST}" + fi + # Check if WHITELIST is not empty, then include it + if [ -n "${WHITELIST}" ]; then + echo ", \"whitelist\": ${WHITELIST}" + fi echo "}" } > "${CONFIG}"