mirror of
https://github.com/mtan93/homeassistant-addons.git
synced 2026-03-08 05:21:51 +00:00
Update TooGoodToGo Home Assistant Mqtt Bridge to 2.3.0
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [2.2.3] - 2022-06.19
|
||||
## [2.3.0] - 2022-06-26
|
||||
|
||||
- Update `toogoodtogo-ha-mqtt-bridge` to `2.3.0` (see [release notes](https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/releases))
|
||||
**Note:** This introduces the new [`intense_fetch`](https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/blob/main/README.md#intense_fetch-optional)
|
||||
|
||||
## [2.2.3] - 2022-06-19
|
||||
|
||||
- Update `toogoodtogo-ha-mqtt-bridge` to `2.2.3` (see [release notes](https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/releases))
|
||||
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:6.0.0
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# Add poetry # TODO: Get rid of the overhead
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
|
||||
ENV PATH=$HOME/.poetry/bin/:${PATH}
|
||||
RUN poetry config virtualenvs.create false
|
||||
|
||||
# add source and unpack
|
||||
ADD "https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/archive/v2.2.3.tar.gz" /src.tar.gz
|
||||
ADD "https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/archive/v2.3.0.tar.gz" /src.tar.gz
|
||||
RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1
|
||||
|
||||
# install
|
||||
WORKDIR /app
|
||||
RUN poetry update && poetry install --no-dev
|
||||
RUN pip install -r requirements.txt
|
||||
RUN python setup.py install
|
||||
|
||||
ADD rootfs /
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: TooGoodToGo Home Assistant MQTT Bridge
|
||||
version: 2.2.3
|
||||
version: 2.3.0
|
||||
image: maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
|
||||
slug: tgtg-ha-mqtt-bridge
|
||||
description: Publish TooGoodToGo stock as MQTT messages
|
||||
@@ -22,6 +22,8 @@ options:
|
||||
email: me@example.com
|
||||
language: en-US
|
||||
polling_schedule: "*/10 * * * *"
|
||||
intense_fetch_interval: 30
|
||||
intense_fetch_period_of_time: 5
|
||||
timezone: Europe/Berlin
|
||||
locale: en_us
|
||||
cleanup: true
|
||||
@@ -35,6 +37,8 @@ schema:
|
||||
email: str
|
||||
language: str
|
||||
polling_schedule: str
|
||||
intense_fetch_interval: int(10,)
|
||||
intense_fetch_period_of_time: int(,60)
|
||||
timezone: str?
|
||||
locale: str?
|
||||
cleanup: bool
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
bashio::log.info "Copy setings file"
|
||||
bashio::log.info "Copy settings file"
|
||||
cp /data/options.json /app/toogoodtogo_ha_mqtt_bridge/settings.local.json
|
||||
|
||||
# as HA add-ons only support config files 2 levels in depth we need to to some alignment of 'intense_fetch'
|
||||
jq ".tgtg += { intense_fetch: { interval: .tgtg.intense_fetch_interval, period_of_time: .tgtg.intense_fetch_period_of_time}}" /app/toogoodtogo_ha_mqtt_bridge/settings.local.json > /app/toogoodtogo_ha_mqtt_bridge/settings.local.json.tmp
|
||||
mv /app/toogoodtogo_ha_mqtt_bridge/settings.local.json.tmp /app/toogoodtogo_ha_mqtt_bridge/settings.local.json
|
||||
|
||||
if ! bashio::fs.file_exists /data/tokens.json; then
|
||||
bashio::log.magenta "No saved tokens found. "
|
||||
bashio::log.magenta "No saved tokens found."
|
||||
bashio::log.magenta "Please make sure to check your email for the login request and answer quickly."
|
||||
bashio::log.magenta "You can't open it on a mobile phone where the TGTG app itself is installed."
|
||||
else
|
||||
bashio::log.cyan "Saved tokens found."
|
||||
bashio::log.cyan "If you encoure problems reinstalling the add-on might help."
|
||||
bashio::log.cyan "If you have any problems reinstalling the add-on might help."
|
||||
fi
|
||||
Reference in New Issue
Block a user