2019-03-17 20:07:36 +01:00
|
|
|
#!/usr/bin/with-contenv bashio
|
2019-02-13 22:05:11 +01:00
|
|
|
# ==============================================================================
|
|
|
|
# Community Hass.io Add-ons: ESPHome
|
|
|
|
# This files installs the user ESPHome version if specified
|
|
|
|
# ==============================================================================
|
|
|
|
|
|
|
|
declare esphome_version
|
|
|
|
|
2019-03-17 20:07:36 +01:00
|
|
|
if bashio::config.has_value 'esphome_version'; then
|
|
|
|
esphome_version=$(bashio::config 'esphome_version')
|
|
|
|
full_url="https://github.com/esphome/esphome/archive/${esphome_version}.zip"
|
|
|
|
bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..."
|
2019-10-19 15:05:41 +02:00
|
|
|
pip3 install -U --no-cache-dir "${full_url}" \
|
2019-03-17 20:07:36 +01:00
|
|
|
|| bashio::exit.nok "Failed installing esphome pinned version."
|
2019-02-13 22:05:11 +01:00
|
|
|
fi
|