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
|
|
|
|
# Runs the ESPHome dashboard
|
|
|
|
# ==============================================================================
|
|
|
|
|
2019-02-27 21:58:56 +01:00
|
|
|
export ESPHOME_IS_HASSIO=true
|
|
|
|
|
2019-03-17 20:07:36 +01:00
|
|
|
if bashio::config.true 'leave_front_door_open'; then
|
2019-02-13 22:05:11 +01:00
|
|
|
export DISABLE_HA_AUTHENTICATION=true
|
|
|
|
fi
|
|
|
|
|
2019-03-17 20:07:36 +01:00
|
|
|
if bashio::config.true 'streamer_mode'; then
|
2019-03-03 16:50:31 +01:00
|
|
|
export ESPHOME_STREAMER_MODE=true
|
2019-02-27 21:58:56 +01:00
|
|
|
fi
|
|
|
|
|
2019-03-17 20:07:36 +01:00
|
|
|
if bashio::config.true 'status_use_ping'; then
|
2019-03-03 16:50:31 +01:00
|
|
|
export ESPHOME_DASHBOARD_USE_PING=true
|
2019-02-27 21:58:56 +01:00
|
|
|
fi
|
|
|
|
|
2019-03-17 20:07:36 +01:00
|
|
|
if bashio::config.has_value 'relative_url'; then
|
|
|
|
export ESPHOME_DASHBOARD_RELATIVE_URL=$(bashio::config 'relative_url')
|
2019-02-27 21:58:56 +01:00
|
|
|
fi
|
|
|
|
|
2019-03-17 20:07:36 +01:00
|
|
|
bashio::log.info "Starting ESPHome dashboard..."
|
2019-02-13 22:05:11 +01:00
|
|
|
exec esphome /config/esphome dashboard --socket /var/run/esphome.sock --hassio
|