Force to use esphome-fork (#57)

This commit is contained in:
Philippe FOUQUET 2022-11-10 10:17:09 +01:00 committed by GitHub
parent 187ee4b9e4
commit 4655d86817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -25,10 +25,11 @@ if bashio::config.has_value 'esphome_fork'; then
curl -L -o /tmp/esphome.tar.gz "${full_url}" -qq \
|| bashio::exit.nok "Failed downloading ESPHome fork."
bashio::log.info "Installing ESPHome from fork '${esphome_fork}' (${full_url})..."
mkdir /esphome-fork
tar -zxf /tmp/esphome.tar.gz -C /esphome-fork --strip-components=1 \
rm -rf /esphome || bashio::exit.nok "Failed to remove ESPHome."
mkdir /esphome
tar -zxf /tmp/esphome.tar.gz -C /esphome --strip-components=1 \
|| bashio::exit.nok "Failed installing ESPHome from fork."
pip install -U -e /esphome-fork || bashio::exit.nok "Failed installing ESPHome from fork."
pip install -U -e /esphome || bashio::exit.nok "Failed installing ESPHome from fork."
rm -f /tmp/esphome.tar.gz
fork_version=$(python3 -c "from esphome.const import __version__; print(__version__)")