mirror of
https://github.com/esphome/home-assistant-addon.git
synced 2024-12-18 16:07:57 +01:00
16 lines
717 B
Bash
16 lines
717 B
Bash
#!/usr/bin/with-contenv bashio
|
|
# ==============================================================================
|
|
# Community Hass.io Add-ons: ESPHome
|
|
# This files installs the user ESPHome version if specified
|
|
# ==============================================================================
|
|
|
|
declare esphome_version
|
|
|
|
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})..."
|
|
pip3 install -U --no-cache-dir "${full_url}" \
|
|
|| bashio::exit.nok "Failed installing esphome pinned version."
|
|
fi
|