mirror of
				https://github.com/home-assistant/frontend.git
				synced 2025-10-31 14:39:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| # Helper to start Home Assistant Core inside the devcontainer
 | |
| 
 | |
| # Stop on errors
 | |
| set -e
 | |
| 
 | |
| if [ -z "${DEVCONTAINER}" ]; then
 | |
|   echo "This task should only run inside a devcontainer, for local install HA Core in a venv."
 | |
|   exit 1
 | |
| fi
 | |
| 
 | |
| if [ -z $(which hass) ]; then
 | |
|   echo "Installing Home Asstant core from dev."
 | |
|   python3 -m pip install --upgrade \
 | |
|     colorlog \
 | |
|     git+git://github.com/home-assistant/home-assistant.git@dev
 | |
| fi
 | |
| 
 | |
| if [ ! -d "/workspaces/frontend/config" ]; then
 | |
|   echo "Creating default configuration."
 | |
|   mkdir -p "/workspaces/frontend/config";
 | |
|   hass --script ensure_config -c config
 | |
|   echo "demo:
 | |
| 
 | |
| logger:
 | |
|   default: info
 | |
|   logs:
 | |
|     homeassistant.components.frontend: debug
 | |
| " >> /workspaces/frontend/config/configuration.yaml
 | |
| 
 | |
|   if [ ! -z "${HASSIO}" ]; then
 | |
|   echo "
 | |
| # frontend:
 | |
| #   development_repo: /workspaces/frontend
 | |
| 
 | |
| hassio:
 | |
|   development_repo: /workspaces/frontend" >> /workspaces/frontend/config/configuration.yaml
 | |
|   else
 | |
|   echo "
 | |
| frontend:
 | |
|   development_repo: /workspaces/frontend
 | |
| 
 | |
| # hassio:
 | |
| #   development_repo: /workspaces/frontend" >> /workspaces/frontend/config/configuration.yaml
 | |
|   fi
 | |
| 
 | |
| fi
 | |
| 
 | |
| hass -c /workspaces/frontend/config
 | 
