You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default action of the image is to run `container`, which will
16
-
- Make sure there's a basic Home Assistant configuration in `/config`
17
-
- Add a default admin user to Home Assistant
18
-
- Skip the onboarding procedure
19
-
- Download and install [HACS](https://hacs.xyz)
20
-
- Download lovelace plugins from github
21
-
- Add plugins to lovelace configuration
22
-
- Start Home Assistant with `-v`
16
+
- Make sure there's a basic Home Assistant configuration in `/config` based on the test configuration provided in the workspace (`/workspace/test/config`).
17
+
- Add a default admin user to Home Assistant.
18
+
- Skip the onboarding procedure.
19
+
- Download and install [HACS](https://hacs.xyz) (optionally).
20
+
- Download lovelace plugins from github (optionally).
21
+
- Add downloaded and local plugins to lovelace configuration. The local plugins are fetched from the distribution folder in the workspace (`/workspace/dist`).
22
+
- Add local integrations to the configuration. The local integrations are fetched from the custom components folder in the workspace (`/workspace/custom_components`).
23
+
- Start Home Assistant with `-v`.
23
24
25
+
## Changelog
26
+
27
+
This is a fork from [thomasloven/hass-custom-devcontainer](https://github.com/thomasloven/hass-custom-devcontainer) with following changes:
28
+
- Updated python environment and dependencies
29
+
- Auto discovery and installation of locally developed plugins and integrations mounted in the `/workspace/dist` and `/workspace/custom_components` folders
30
+
- Test configuration files mounted in the `/workspace/test/config` folder are preprocessed and copied to `/config` to be used by Home Assistant
31
+
- Added support for bypassing the login form and for trusting the specified proxies
32
+
- Built-in support for running this container as a codespace (see below)
24
33
25
34
### Environment Variables
26
35
27
36
| Name | Description | Default |
28
37
|---|---|---|
29
38
|`HASS_USERNAME`| The username of the default user |`dev`|
30
39
|`HASS_PASSWORD`| The password of the default user |`dev`|
31
-
|`LOVELACE_PLUGINS`| List of lovelac plugins to download from github | Empty |
32
-
|`LOVELACE_LOCAL_FILES`| List of filenames in `/config/www/workspace` to add as lovelace resources | Emtpy |
40
+
|`HASS_BYPASS_LOGIN`| Flag indicating whether to bypass the login form |`false`|
41
+
|`HASS_TRUSTED_PROXIES`| Semicolon separated list of proxy ip addresses to trust | Empty (`::1` in codespace) |
42
+
|`HASS_AUTO_RESTART`| Flag indicating whether Home Assistant should be automatically restarted once a change in the test configuration or local module files is detected |`true`|
43
+
|`INSTALL_HACS`| Flag indicating whether to install HACS |`false`|
44
+
|`LOVELACE_PLUGINS`| Semicolon separated list of lovelace plugins to download from github | Empty |
45
+
|`ENV_FILE`| Path to environment file | Empty |
46
+
|`CODESPACE_PLUGINS`| Path to the distribution folder containing the modules of the locally worked on plugins |`$pwd/dist`|
47
+
|`CODESPACE_INTEGRATIONS`| Path to the custom components folder containing the files of the locally worked on integrations |`$pwd/custom_components`|
48
+
|`CODESPACE_TEST`| Path to the test folder containing the configuration files for the test environment |`$pwd/test`|
49
+
50
+
### Mount Points
51
+
52
+
A `/workspace` volume is set up to make local files available in the container. More specifically, all test related files
53
+
can be mounted in `/workspace/test`, all locally built javascript modules (plugins) can be mounted in `/workspace/dist`
54
+
and all locally developed python modules (integrations) can be mounted in `/workspace/custom_components`.
55
+
56
+
Custom configuration files for Home Assistant should be placed inside the `config` folder of the test mount point.
57
+
Note that the configuration file might be modified while launching the container, depending on the value of certain
58
+
environment variables. To avoid unwanted modifications to your ogininal configuration file, the contents of
59
+
`/workspace/test/config` are copied to `/config` before starting Home Assistant.
60
+
Similarly the contents of the `/workspace/dist` folder are copied to `/config/www/workspace` and the contents of
61
+
the `/workspace/custom_components` folder are copied to `/config/custom_components`.
62
+
When the container script is launched, each mount point is continuously watched for any changes. These changes are
63
+
then immediately reflected in Home Assistant's configuration folder.
64
+
65
+
**Note**: When working in a codespace, the active workspace files can be bound through the `CODESPACE_PLUGINS`,
66
+
`CODESPACE_INTEGRATIONS` and `CODESPACE_TEST` environment variables.
33
67
34
68
### About Lovelace Plugins
35
-
The dowload and install of plugins is *very* basic. This is not HACS.
69
+
The dowload and installation of plugins is *very* basic. This is not HACS.
70
+
71
+
`LOVELACE_PLUGINS` should be a semicolon separated list of author/repo pairs, e.g. `thomasloven/lovelace-card-mod;kalkih/mini-media-player`
36
72
37
-
`LOVELACE_PLUGINS` should be a space separated list of author/repo pairs, e.g. `"thomasloven/lovelace-card-mod kalkih/mini-media-player"`
73
+
Any locally developed javascript modules mounted in `/workspace/dist` are also installed.
38
74
39
-
`LOVELACE_LOCAL_FILES` is for the currently worked on plugins and should be a list of file names which are mounted in `/config/www/workspace`.
75
+
### About Integrations
76
+
If a locally developed integration is not manually configured in the test configuration, it is automatically added.
40
77
41
78
### Container Script
42
79
@@ -60,13 +97,31 @@ Launch Home Assistant with `hass -c /config -v`
0 commit comments