mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Rename esphomeyaml to esphome (#426)
* Rename * Update * Add migration * Fix * Fix dashboard * Change test * Fixes * Code cleanup * Fix import order * Update * Automate docker builds * Shellcheck
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: esphomeyaml | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # This files check if all user configuration requirements are met | ||||
| # ============================================================================== | ||||
| # shellcheck disable=SC1091 | ||||
| @@ -22,7 +22,7 @@ if hass.config.true 'ssl'; then | ||||
|             text="You enabled encrypted connections using the \"ssl\": true option. | ||||
|             However, the SSL files \"$(hass.config.get 'certfile')\" and \"$(hass.config.get 'keyfile')\" | ||||
|             were not found. If you're using Hass.io on your local network and don't want | ||||
|             to encrypt connections to the esphomeyaml dashboard, you can manually disable | ||||
|             to encrypt connections to the ESPHome dashboard, you can manually disable | ||||
|             SSL by setting \"ssl\" to false." | ||||
|             hass.die "${text}" | ||||
|         fi | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: esphomeyaml | ||||
| # Configures NGINX for use with esphomeyaml | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # Configures NGINX for use with ESPHome | ||||
| # ============================================================================== | ||||
| # shellcheck disable=SC1091 | ||||
| source /usr/lib/hassio-addons/base.sh | ||||
|   | ||||
| @@ -1,14 +1,14 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: esphomeyaml | ||||
| # This files installs the user esphomeyaml version if specified | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # This files installs the user ESPHome version if specified | ||||
| # ============================================================================== | ||||
| # shellcheck disable=SC1091 | ||||
| source /usr/lib/hassio-addons/base.sh | ||||
| 
 | ||||
| declare esphomeyaml_version | ||||
| declare esphome_version | ||||
| 
 | ||||
| if hass.config.has_value 'esphomeyaml_version'; then | ||||
|     esphomeyaml_version=$(hass.config.get 'esphomeyaml_version') | ||||
|     pip2 install --no-cache-dir --no-binary :all: "https://github.com/OttoWinter/esphomeyaml/archive/${esphomeyaml_version}.zip" | ||||
| if hass.config.has_value 'esphome_version'; then | ||||
|     esphome_version=$(hass.config.get 'esphome_version') | ||||
|     pip2 install --no-cache-dir --no-binary :all: "https://github.com/esphome/esphome/archive/${esphome_version}.zip" | ||||
| fi | ||||
							
								
								
									
										13
									
								
								esphomeyaml-edge/rootfs/etc/cont-init.d/40-migrate.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								esphomeyaml-edge/rootfs/etc/cont-init.d/40-migrate.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # This files migrates the esphome config directory from the old path | ||||
| # ============================================================================== | ||||
| # shellcheck disable=SC1091 | ||||
| source /usr/lib/hassio-addons/base.sh | ||||
|  | ||||
| if [[ ! -d /config/esphome && -d /config/esphomeyaml ]]; then | ||||
|     echo "Moving config directory from /config/esphomeyaml to /config/esphome" | ||||
|     mv /config/esphomeyaml /config/esphome | ||||
|     mv /config/esphome/.esphomeyaml /config/esphome/.esphome | ||||
| fi | ||||
| @@ -13,9 +13,9 @@ http { | ||||
|     sendfile           on; | ||||
|     keepalive_timeout  65; | ||||
|  | ||||
|     upstream esphomeyaml { | ||||
|     upstream esphome { | ||||
|         ip_hash; | ||||
|         server unix:/var/run/esphomeyaml.sock; | ||||
|         server unix:/var/run/esphome.sock; | ||||
|     } | ||||
|     map $http_upgrade $connection_upgrade { | ||||
|         default upgrade; | ||||
| @@ -45,7 +45,7 @@ http { | ||||
|  | ||||
|         location / { | ||||
|             proxy_redirect off; | ||||
|             proxy_pass http://esphomeyaml; | ||||
|             proxy_pass http://esphome; | ||||
|  | ||||
|             proxy_http_version 1.1; | ||||
|             proxy_set_header Upgrade $http_upgrade; | ||||
|   | ||||
| @@ -13,9 +13,9 @@ http { | ||||
|     sendfile           on; | ||||
|     keepalive_timeout  65; | ||||
|  | ||||
|     upstream esphomeyaml { | ||||
|     upstream esphome { | ||||
|         ip_hash; | ||||
|         server unix:/var/run/esphomeyaml.sock; | ||||
|         server unix:/var/run/esphome.sock; | ||||
|     } | ||||
|     map $http_upgrade $connection_upgrade { | ||||
|         default upgrade; | ||||
| @@ -29,7 +29,7 @@ http { | ||||
|  | ||||
|         location / { | ||||
|             proxy_redirect off; | ||||
|             proxy_pass http://esphomeyaml; | ||||
|             proxy_pass http://esphome; | ||||
|  | ||||
|             proxy_http_version 1.1; | ||||
|             proxy_set_header Upgrade $http_upgrade; | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| #!/usr/bin/execlineb -S0 | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: esphomeyaml | ||||
| # Take down the S6 supervision tree when esphomeyaml fails | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # Take down the S6 supervision tree when ESPHome fails | ||||
| # ============================================================================== | ||||
| if -n { s6-test $# -ne 0 } | ||||
| if -n { s6-test ${1} -eq 256 } | ||||
| @@ -1,7 +1,7 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: esphomeyaml | ||||
| # Runs the esphomeyaml dashboard | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # Runs the ESPHome dashboard | ||||
| # ============================================================================== | ||||
| # shellcheck disable=SC1091 | ||||
| source /usr/lib/hassio-addons/base.sh | ||||
| @@ -10,5 +10,5 @@ if hass.config.true 'leave_front_door_open'; then | ||||
|     export DISABLE_HA_AUTHENTICATION=true | ||||
| fi | ||||
| 
 | ||||
| hass.log.info "Starting esphomeyaml dashboard..." | ||||
| exec esphomeyaml /config/esphomeyaml dashboard --socket /var/run/esphomeyaml.sock --hassio | ||||
| hass.log.info "Starting ESPHome dashboard..." | ||||
| exec esphome /config/esphome dashboard --socket /var/run/esphome.sock --hassio | ||||
| @@ -1,6 +1,6 @@ | ||||
| #!/usr/bin/execlineb -S0 | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: esphomeyaml | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # Take down the S6 supervision tree when NGINX fails | ||||
| # ============================================================================== | ||||
| if -n { s6-test $# -ne 0 } | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| #!/usr/bin/with-contenv bash | ||||
| # ============================================================================== | ||||
| # Community Hass.io Add-ons: esphomeyaml | ||||
| # Community Hass.io Add-ons: ESPHome | ||||
| # Runs the NGINX proxy | ||||
| # ============================================================================== | ||||
| # shellcheck disable=SC1091 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user