mirror of
https://github.com/esphome/home-assistant-addon.git
synced 2024-12-23 16:58:18 +01:00
29 lines
877 B
Plaintext
Executable File
29 lines
877 B
Plaintext
Executable File
#!/usr/bin/with-contenv bash
|
|
# ==============================================================================
|
|
# Community Hass.io Add-ons: ESPHome
|
|
# Runs the ESPHome dashboard
|
|
# ==============================================================================
|
|
# shellcheck disable=SC1091
|
|
source /usr/lib/hassio-addons/base.sh
|
|
|
|
export ESPHOME_IS_HASSIO=true
|
|
|
|
if hass.config.true 'leave_front_door_open'; then
|
|
export DISABLE_HA_AUTHENTICATION=true
|
|
fi
|
|
|
|
if hass.config.true 'streamer_mode'; then
|
|
export ESPHOME_STREAMER_MODE=true
|
|
fi
|
|
|
|
if hass.config.true 'status_use_ping'; then
|
|
export ESPHOME_DASHBOARD_USE_PING=true
|
|
fi
|
|
|
|
if hass.config.has_value 'relative_url'; then
|
|
export ESPHOME_DASHBOARD_RELATIVE_URL=$(hass.config.get 'relative_url')
|
|
fi
|
|
|
|
hass.log.info "Starting ESPHome dashboard..."
|
|
exec esphome /config/esphome dashboard --socket /var/run/esphome.sock --hassio
|