Skip to content

Commit 0f65735

Browse files
wpyogafrenck
andauthored
Fix wrong command for local repository (#2496)
Co-authored-by: Franck Nijhof <[email protected]>
1 parent 021592b commit 0f65735

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

docs/development_environment.mdx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ title: "Set up development environment"
66
import {useState} from 'react';
77
88
export const RepositoryOpener = () => {
9-
const [value, setValue] = useState(0);
9+
const [value, setValue] = useState("");
1010
const repoUrl = `vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=${encodeURIComponent(value)}`;
1111
return <div>
1212
<input onInput={(ev) => setValue(ev.target.value)} style={{width: "80%", display: "inline-block", marginRight: 16}} />
13-
<a href={repoUrl}><button style={{cursor: value == "" ? "default" : "pointer"}} disabled={value == ""}>Open</button></a>
13+
<a href={repoUrl}><button style={{cursor: value === "" ? "default" : "pointer"}} disabled={value === ""}>Open</button></a>
1414
</div>
1515
}
1616
```
@@ -33,37 +33,39 @@ As this approach uses containers, you may face challenges exposing hardware like
3333

3434
**Getting started:**
3535

36-
1. Go to [Home Assistant core repository](https://github.com/home-assistant/core) and click "fork".
37-
2. Once your fork is created, copy the URL of your fork and paste it below, then click "Open":
36+
1. Go to [Home Assistant core repository](https://github.com/home-assistant/core) and click **Fork**.
37+
2. Copy your fork's URL and paste it below, then click **Open**:
3838
<RepositoryOpener />
39-
3. Your browser will prompt you if you want to use Visual Studio Code to open the link, click "Open Link".
40-
4. When Visual Studio Code asks if you want to install the Remote extension, click "Install".
41-
5. The Dev Container image will then be built (this may take a few minutes), after this your development environment will be ready.
39+
3. Your browser will prompt you if you want to use Visual Studio Code to open the link, click **Open Link**.
40+
4. When Visual Studio Code asks if you want to install the Remote - SSH extension, click **Install**.
41+
5. The dev container image will then be built (this may take a few minutes), after this your development environment will be ready.
4242
6. You can verify that your dev container is set up properly by the following:
43-
* Open the command palette in Visual Studio Code - `Shift`+`Command`+`P`(Mac) / `Ctrl`+`Shift`+`P` (Windows/Linux).
44-
* Select `Tasks: Run Task` -> `Run Home Assistant Core`
45-
* A terminal should open and begin outputting activity. Check for errors and wait for the output to stop/slow down.
46-
* Navigate a web browser to `http://localhost:8123`, and you should see the Home Assistant setup screen.
43+
1. Open the Command Palette in Visual Studio Code:
44+
* Mac: `Shift`+`Command`+`P`
45+
* Windows/Linux: `Ctrl`+`Shift`+`P`
46+
2. Select **Tasks: Run Task** -> **Run Home Assistant Core**
47+
3. A terminal should open and begin outputting activity. Check for errors and wait for the output to stop/slow down.
48+
4. Navigate a web browser to `http://localhost:8123`, and you should see the Home Assistant setup screen.
4749

48-
In the future, if you want to get back to your development environment: open Visual Studio Code, click on the "Remote Explorer" button in the sidebar, select "Containers" at the top of the sidebar.
50+
In the future, if you want to get back to your development environment: open Visual Studio Code, click on the **Remote Explorer** button in the sidebar, select **Containers** at the top of the sidebar.
4951

5052
### Tasks
5153

52-
The devcontainer comes with some useful tasks to help you with development, you can start these tasks by opening the command palette with `Shift`+`Command`+`P`(Mac) / `Ctrl`+`Shift`+`P` (Windows/Linux) and select `Tasks: Run Task` then select the task you want to run.
54+
The dev container comes with some useful tasks to help you with development. You can run these tasks by opening the Command Palette with `Shift`+`Command`+`P`(Mac) / `Ctrl`+`Shift`+`P` (Windows/Linux) and selecting **Tasks: Run Task**, then finally selecting the task you want to run.
5355

54-
When a task is currently running (like `Preview` for the docs), it can be restarted by opening the command palette and selecting `Tasks: Restart Running Task`, then select the task you want to restart.
56+
When a task is currently running (like `Preview` for the docs), it can be restarted by opening the Command Palette and selecting **Tasks: Restart Running Task**, then select the task you want to restart.
5557

5658
### Debugging with Visual Studio Code
5759

58-
If the Dev Container was set up correctly - it supports debugging by default, out-of-the-box. It provides the necessary debug configurations, so hitting F5 should launch Home Assistant. Any breakpoints put in the code should be triggered, and the debugger should stop.
60+
If the dev container was set up correctly - it supports debugging by default, out-of-the-box. It provides the necessary debug configurations, so hitting F5 should launch Home Assistant. Any breakpoints put in the code should be triggered, and the debugger should stop.
5961

6062
It is also possible to debug a remote Home Assistance instance (e.g., production instance) by following the procedure described [here](https://www.home-assistant.io/integrations/debugpy/).
6163

6264
## Manual Environment
6365

6466
_You only need these instructions if you do not want to use devcontainers._
6567

66-
It is also possible to set up a more traditional development environment. See the section for your operating system. Make sure your Python version is 3.12.
68+
It is also possible to set up a more traditional development environment. See the section below for your operating system. Make sure your Python version is 3.12.
6769

6870
### Developing on Ubuntu / Debian
6971

@@ -117,8 +119,8 @@ Visit the [Home Assistant Core repository](https://github.com/home-assistant/cor
117119
Once forked, setup your local copy of the source using the commands:
118120

119121
```shell
120-
git clone https://github.com/YOUR_GIT_USERNAME/short_name_of_your_fork
121-
cd core
122+
git clone https://github.com/YOUR_GIT_USERNAME/name_of_your_fork
123+
cd name_of_your_fork
122124
git remote add upstream https://github.com/home-assistant/core.git
123125
```
124126

@@ -128,7 +130,7 @@ Install the requirements with a provided script named `setup`.
128130
script/setup
129131
```
130132

131-
This will create a virtual environment and install all necessary requirements. You're now set!
133+
This will create a virtual environment and install all the necessary requirements. You're now set!
132134

133135
Each time you start a new terminal session, you will need to activate your virtual environment:
134136

@@ -142,6 +144,6 @@ After that you can run Home Assistant like this:
142144
hass -c config
143145
```
144146

145-
If you encounter a crash (`SIGKILL`) while running this command on *macOS*, it's probably about lack of Bluetooth permission. You can fix it by adding this permission for your Terminal app (System Preferences -> Security & Privacy -> Bluetooth).
147+
If you encounter a crash (`SIGKILL`) while running this command on *macOS*, it's probably caused by the lack of Bluetooth permissions. You can fix it by adding this permission for your Terminal app (**System Preferences** -> **Security & Privacy** -> **Bluetooth**).
146148

147-
The Home Assistant configuration is stored in the `config` directory in your repository.
149+
The Home Assistant configuration is stored in the `config` directory at the root of your repository.

0 commit comments

Comments
 (0)