1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 04:12:23 +01:00

Use /data directory for .esphome folder when running as HA add-on (#5374)

This commit is contained in:
Jesse Hills
2023-09-12 09:26:48 +12:00
committed by GitHub
parent 10eee47b6b
commit fe81bcc003
11 changed files with 53 additions and 43 deletions

View File

@@ -35,11 +35,16 @@ if bashio::config.has_value 'default_compile_process_limit'; then
export ESPHOME_DEFAULT_COMPILE_PROCESS_LIMIT=$(bashio::config 'default_compile_process_limit')
else
if grep -q 'Raspberry Pi 3' /proc/cpuinfo; then
export ESPHOME_DEFAULT_COMPILE_PROCESS_LIMIT=1;
export ESPHOME_DEFAULT_COMPILE_PROCESS_LIMIT=1
fi
fi
mkdir -p "${pio_cache_base}"
if bashio::fs.directory_exists '/config/esphome/.esphome'; then
bashio::log.info "Removing old .esphome directory..."
rm -rf /config/esphome/.esphome
fi
bashio::log.info "Starting ESPHome dashboard..."
exec esphome dashboard /config/esphome --socket /var/run/esphome.sock --ha-addon