Update Docusaurus to v3 (#1995)

This commit is contained in:
Tom Brien 2024-06-08 09:38:41 +01:00 committed by GitHub
parent 40731f291f
commit f3b9c78185
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 4155 additions and 2397 deletions

2
.nvmrc
View File

@ -1 +1 @@
18
20

View File

@ -37,7 +37,8 @@ This strategy allows us to not waste any of our workers time on running a full t
Below is a screenshot of our CI pipeline for Home Assistant. Because all work is distributed over multiple workers, the total runtime is the longest task in the first column, plus the longest task in the second column.
<center>
![Screenshot of the Home Assistant CI pipeline.](/img/en/blog/2019-07-building-all-the-things/test-stages.png)</center>
![Screenshot of the Home Assistant CI pipeline.](/img/en/blog/2019-07-building-all-the-things/test-stages.png)
</center>
To improve the time of our CI on Azure, were using a preview version of [pipeline artifact caching](https://marketplace.visualstudio.com/items?itemName=1ESLighthouseEng.PipelineArtifactCaching). This allows us to build the dependencies once, store it as a package close to the test runners and re-use it across jobs and pipeline runs.

View File

@ -26,7 +26,8 @@ In simple mode, we will structure the configuration to how the user thinks about
- Outputs: scenes, scripts, automations
<center>
![Configuration concepts. Inputs are users, integrations, zones, persons, devices. Outputs are scenes, scripts and automations.](/img/en/blog/2019-10-simple-mode/config-concepts.png)</center>
![Configuration concepts. Inputs are users, integrations, zones, persons, devices. Outputs are scenes, scripts and automations.](/img/en/blog/2019-10-simple-mode/config-concepts.png)
</center>
<!-- https://docs.google.com/drawings/d/1021ATCQ_Q3eBQQ1Ei5Bq7rSBfn6YtLh9113HimpsYWs/edit?usp=sharing -->

View File

@ -15,65 +15,79 @@ Config Entries are configuration data that are persistently stored by Home Assis
| migration error | The config entry had to be migrated to a newer version, but the migration failed.
| failed unload | The config entry was attempted to be unloaded, but this was either not supported or it raised an exception.
More information about surfacing errors and requesting a retry are in [Handling Setup Failures](integration_setup_failures.md/#integrations-using-async_setup_entry).
More information about surfacing errors and requesting a retry are in [Handling Setup Failures](integration_setup_failures.md#integrations-using-async_setup_entry).
<svg class='invertDark' width="508pt" height="188pt" viewBox="0.00 0.00 508.00 188.00" xmlns="http://www.w3.org/2000/svg">
<g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 184)">
<title>G</title>
<polygon fill="none" stroke="none" points="-4,5 -4,-184 505,-184 505,5 -4,5"></polygon>
<g id="node1" class="node"><title>not loaded</title>
<g id="node1" class="node">
<title>not loaded</title>
<ellipse fill="none" stroke="black" cx="168" cy="-162" rx="51.3007" ry="18"></ellipse>
<text text-anchor="middle" x="168" y="-157.8" font-family="Times,serif" font-size="14.00">not loaded</text>
</g>
<g id="node3" class="node"><title>loaded</title>
<g id="node3" class="node">
<title>loaded</title>
<ellipse fill="none" stroke="black" cx="61" cy="-90" rx="36.1722" ry="18"></ellipse>
<text text-anchor="middle" x="61" y="-85.8" font-family="Times,serif" font-size="14.00">loaded</text>
</g>
<g id="edge2" class="edge"><title>not loaded-&gt;loaded</title>
<g id="edge2" class="edge">
<title>not loaded-&gt;loaded</title>
<path fill="none" stroke="black" d="M140.518,-146.666C123.947,-136.676 103.104,-123.187 86.8392,-111.989"></path>
<polygon fill="black" stroke="black" points="88.532,-108.902 78.3309,-106.041 84.5212,-114.639 88.532,-108.902"></polygon>
</g>
<g id="node5" class="node"><title>setup error</title>
<g id="node5" class="node">
<title>setup error</title>
<ellipse fill="none" stroke="black" cx="168" cy="-90" rx="52.3895" ry="18"></ellipse>
<text text-anchor="middle" x="168" y="-85.8" font-family="Times,serif" font-size="14.00">setup error</text>
</g>
<g id="edge4" class="edge"><title>not loaded-&gt;setup error</title>
<g id="edge4" class="edge">
<title>not loaded-&gt;setup error</title>
<path fill="none" stroke="black" d="M162.122,-144.055C161.304,-136.346 161.061,-127.027 161.395,-118.364"></path>
<polygon fill="black" stroke="black" points="164.894,-118.491 162.087,-108.275 157.911,-118.012 164.894,-118.491"></polygon>
</g>
<g id="node7" class="node"><title>setup retry</title>
<g id="node7" class="node">
<title>setup retry</title>
<ellipse fill="none" stroke="black" cx="291" cy="-90" rx="52.0932" ry="18"></ellipse>
<text text-anchor="middle" x="291" y="-85.8" font-family="Times,serif" font-size="14.00">setup retry</text>
</g>
<g id="edge6" class="edge"><title>not loaded-&gt;setup retry</title>
<g id="edge6" class="edge">
<title>not loaded-&gt;setup retry</title>
<path fill="none" stroke="black" d="M189.578,-145.465C206.94,-134.869 231.584,-120.783 252.292,-109.59"></path>
<polygon fill="black" stroke="black" points="254.022,-112.634 261.19,-104.832 250.722,-106.461 254.022,-112.634"></polygon>
</g>
<g id="node9" class="node"><title>migration error</title>
<g id="node9" class="node">
<title>migration error</title>
<ellipse fill="none" stroke="black" cx="431" cy="-90" rx="69.1427" ry="18"></ellipse>
<text text-anchor="middle" x="431" y="-85.8" font-family="Times,serif" font-size="14.00">migration error</text>
</g>
<g id="edge8" class="edge"><title>not loaded-&gt;migration error</title>
<g id="edge8" class="edge">
<title>not loaded-&gt;migration error</title>
<path fill="none" stroke="black" d="M207.659,-150.445C252.053,-138.628 324.343,-119.388 374.607,-106.01"></path>
<polygon fill="black" stroke="black" points="375.588,-109.37 384.351,-103.416 373.787,-102.606 375.588,-109.37"></polygon>
</g>
<g id="edge10" class="edge"><title>loaded-&gt;not loaded</title>
<g id="edge10" class="edge">
<title>loaded-&gt;not loaded</title>
<path fill="none" stroke="black" d="M85.5216,-103.56C102.143,-113.462 123.939,-127.508 141.027,-139.231"></path>
<polygon fill="black" stroke="black" points="139.274,-142.276 149.481,-145.116 143.273,-136.53 139.274,-142.276"></polygon>
</g>
<g id="node12" class="node"><title>failed unload</title>
<g id="node12" class="node">
<title>failed unload</title>
<ellipse fill="none" stroke="black" cx="61" cy="-18" rx="61.5781" ry="18"></ellipse>
<text text-anchor="middle" x="61" y="-13.8" font-family="Times,serif" font-size="14.00">failed unload</text>
</g>
<g id="edge12" class="edge"><title>loaded-&gt;failed unload</title>
<g id="edge12" class="edge">
<title>loaded-&gt;failed unload</title>
<path fill="none" stroke="black" d="M61,-71.6966C61,-63.9827 61,-54.7125 61,-46.1124"></path>
<polygon fill="black" stroke="black" points="64.5001,-46.1043 61,-36.1043 57.5001,-46.1044 64.5001,-46.1043"></polygon>
</g>
<g id="edge16" class="edge"><title>setup error-&gt;not loaded</title>
<g id="edge16" class="edge">
<title>setup error-&gt;not loaded</title>
<path fill="none" stroke="black" d="M173.913,-108.275C174.715,-116.03 174.94,-125.362 174.591,-134.005"></path>
<polygon fill="black" stroke="black" points="171.094,-133.832 173.878,-144.055 178.077,-134.327 171.094,-133.832"></polygon>
</g>
<g id="edge14" class="edge"><title>setup retry-&gt;not loaded</title>
<g id="edge14" class="edge">
<title>setup retry-&gt;not loaded</title>
<path fill="none" stroke="black" d="M269.469,-106.507C252.104,-117.106 227.436,-131.206 206.71,-142.408"></path>
<polygon fill="black" stroke="black" points="204.973,-139.368 197.805,-147.17 208.273,-145.541 204.973,-139.368"></polygon>
</g>

View File

@ -19,9 +19,9 @@ The Air Quality entity does not support attribute shorthand for [property implem
| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| particulate_matter_2_5 | <code>str &#124; int &#124; float &#124; None</code> | **Required** | The particulate matter 2.5 (<= 2.5 μm) level.
| particulate_matter_10 | <code>str &#124; int &#124; float &#124; None</code> | `None` | The particulate matter 10 (<= 10 μm) level.
| particulate_matter_0_1 | <code>str &#124; int &#124; float &#124; None</code> | `None` | The particulate matter 0.1 (<= 0.1 μm) level.
| particulate_matter_2_5 | <code>str &#124; int &#124; float &#124; None</code> | **Required** | The particulate matter 2.5 (\<= 2.5 μm) level.
| particulate_matter_10 | <code>str &#124; int &#124; float &#124; None</code> | `None` | The particulate matter 10 (\<= 10 μm) level.
| particulate_matter_0_1 | <code>str &#124; int &#124; float &#124; None</code> | `None` | The particulate matter 0.1 (\<= 0.1 μm) level.
| air_quality_index | <code>str &#124; int &#124; float &#124; None</code> | `None` | The Air Quality Index (AQI).
| ozone | <code>str &#124; int &#124; float &#124; None</code> | `None` | The O3 (ozone) level.
| carbon_monoxide | <code>str &#124; int &#124; float &#124; None</code> | `None` | The CO (carbon monoxide) level.

View File

@ -24,7 +24,7 @@ If your integration is going to register services, it will need to provide a des
## Data update coordinator - `coordinator.py`
There are multiple ways for your integration to receive data, including push or poll. Commonly integrations will fetch data with a single coordinated poll across all entities, which requires the use of a `DataUpdateCoordinator`.
If you want to use one, and you choose to create a subclass of it, it is recommended to define the coordinator class in `coordinator.py`. [More information about `DataUpdateCoordinator`](integration_fetching_data.md/#coordinated-single-api-poll-for-data-for-all-entities).
If you want to use one, and you choose to create a subclass of it, it is recommended to define the coordinator class in `coordinator.py`. [More information about `DataUpdateCoordinator`](integration_fetching_data.md#coordinated-single-api-poll-for-data-for-all-entities).
## Where Home Assistant looks for integrations

View File

@ -455,7 +455,7 @@ class TestFlow(config_entries.ConfigFlow, domain=DOMAIN):
### Show menu
This will show a navigation menu to the user to easily pick the next step. The menu labels can be hardcoded by specifying a dictionary of {`step_id`: `label`} or translated via `strings.json` when specifying a list.
This will show a navigation menu to the user to easily pick the next step. The menu labels can be hardcoded by specifying a dictionary of `{step_id: label}` or translated via `strings.json` when specifying a list.
```python
class ExampleConfigFlow(data_entry_flow.FlowHandler):

View File

@ -88,7 +88,7 @@ sudo dnf install python3-pip python3-devel python3-virtualenv autoconf openssl-d
To develop on Windows, you will need to use the Linux subsystem (WSL). Follow the [WSL installation instructions](https://learn.microsoft.com/windows/wsl/install) and install Ubuntu from the Windows Store. Once you're able to access Linux, follow the Linux instructions.
:::tip
If you find that you cannot open the development instance via <http://localhost:8123> when using WSL, instead, within a WSL terminal, find the `inet` address of the `eth0` adaptor by running `ip addr show eth0`. Then use this address, excluding the CIDR block, to access the development instance, i.e. if your `inet` is listed as `172.20.37.6/20`, use <http://172.20.37.6:8123>.
If you find that you cannot open the development instance via [http://localhost:8123](http://localhost:8123) when using WSL, instead, within a WSL terminal, find the `inet` address of the `eth0` adaptor by running `ip addr show eth0`. Then use this address, excluding the CIDR block, to access the development instance, i.e. if your `inet` is listed as `172.20.37.6/20`, use [http://172.20.37.6:8123](http://172.20.37.6:8123).
:::
#### Freshly installed WSL distribution

View File

@ -111,7 +111,7 @@ in my home! I love it!
## Renaming pages
It can happen that an integration or platform is renamed, in this case the documentation needs to be updated as well. If you rename a page, add an entry to the `_redirects` file as shown below. Please consider to add details, like release number or old integration/platform name, to the page in a [note](/documenting/create-page.md/#html).
It can happen that an integration or platform is renamed, in this case the documentation needs to be updated as well. If you rename a page, add an entry to the `_redirects` file as shown below. Please consider to add details, like release number or old integration/platform name, to the page in a [note](/documenting/create-page.md#html).
```text
---

View File

@ -3,14 +3,14 @@ title: "Frontend design"
sidebar_label: "Design"
---
We maintain a design portal at <https://design.home-assistant.io> that provides information about various frontend aspects such as:
We maintain a design portal at [https://design.home-assistant.io](https://design.home-assistant.io) that provides information about various frontend aspects such as:
* UI components that can be reused.
* Dashboard cards in various configurations and states.
* Easy way to compare components and cards between light and dark themes.
* Notes about specific wording in Home Assistant.
When new components or features are added to the frontend, those need to be added to the design portal. This portal page explains the details on how to do so: <https://design.home-assistant.io/#design.home-assistant.io/editing>
When new components or features are added to the frontend, those need to be added to the design portal. This portal page explains the details on how to do so: [https://design.home-assistant.io/#design.home-assistant.io/editing](https://design.home-assistant.io/#design.home-assistant.io/editing)
:::note
While the portal is publically named "design", it is referred to as "gallery" in the frontend repository. That is why the script to run the gallery locally in your development environment can be found at `gallery/script/develop_gallery` and the source code in `gallery/src`.

View File

@ -22,7 +22,7 @@ This integration is able to cope when things go wrong. It will not print any exc
- Satisfying all No score level requirements.
- Connection/configuration is handled via a component.
- Set an appropriate `SCAN_INTERVAL` (if a polling integration)
- Raise [`PlatformNotReady`](integration_setup_failures.md/#integrations-using-async_setup_platform) if unable to connect during platform setup (if appropriate)
- Raise [`PlatformNotReady`](integration_setup_failures.md#integrations-using-async_setup_platform) if unable to connect during platform setup (if appropriate)
- Handles expiration of auth credentials. Refresh if possible or print correct error and fail setup. If based on a config entry, should trigger a new config entry flow to re-authorize. ([docs](config_entries_config_flow_handler.md#reauthentication))
- Handles internet unavailable. Log a warning once when unavailable, log once when reconnected.
- Handles device/service unavailable. Log a warning once when unavailable, log once when reconnected.
@ -39,7 +39,7 @@ This is a solid integration that is able to survive poor conditions and can be c
- Don't allow configuring already configured device/service (example: no 2 entries for same hub)
- Discoverable (if available)
- Set unique ID in config flow (if available)
- Raise [`ConfigEntryNotReady`](integration_setup_failures.md/#integrations-using-async_setup_entry) if unable to connect during entry setup (if appropriate)
- Raise [`ConfigEntryNotReady`](integration_setup_failures.md#integrations-using-async_setup_entry) if unable to connect during entry setup (if appropriate)
- Entities have device info (if available) ([docs](device_registry_index.md#defining-devices))
- Tests
- Full test coverage for the config flow
@ -61,7 +61,7 @@ Best of the best. The integration is completely async, meaning it's super fast.
- Support config entry unloading (called when config entry is removed)
- Integration + dependency are async ([docs](asyncio_working_with_async.md))
- Uses aiohttp or httpx and allows passing in websession (if making HTTP requests)
- [Handles expired credentials](integration_setup_failures.md/#handling-expired-credentials) (if appropriate)
- [Handles expired credentials](integration_setup_failures.md#handling-expired-credentials) (if appropriate)
## Internal 🏠

View File

@ -14,7 +14,7 @@ Home Assistant Operating System releases are built from the release branch. GitH
The format of version is *MAJOR.BUILD*. Every time a new release is released the BUILD number gets incremented (stored in `buildroot-external/meta`). The MAJOR number is inherited from the development branch, and gets bumped right after the release branch has been created.
The build system by default automatically adds a *dev{DATE}* suffix to mark development builds.
The build system by default automatically adds a *dev\{DATE\}* suffix to mark development builds.
Before a new major release, release candidates can be built on the development branch. A release candidate suffix is used to mark them, e.g. *MAJOR.0.rc1*.

View File

@ -118,7 +118,7 @@ To develop for the `hassio` integration and the Supervisor panel, we're going to
[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Faddons-development)
[![Open your Home Assistant instance and show the dashboard of a Supervisor add-on.](https://my.home-assistant.io/badges/supervisor_addon.svg)](https://my.home-assistant.io/redirect/supervisor_addon/?addon=ae6e943c_remote_api)
1. Add our developer Add-on repository: <https://github.com/home-assistant/addons-development>
1. Add our developer Add-on repository: [https://github.com/home-assistant/addons-development](https://github.com/home-assistant/addons-development)
2. Install the Add-on "Remote API proxy"
3. Click Start
4. The token will be printed in the logs

View File

@ -12,17 +12,21 @@
"deploy": "docusaurus deploy"
},
"dependencies": {
"@docusaurus/core": "^2.2.0",
"@docusaurus/preset-classic": "^2.4.3",
"@docusaurus/theme-mermaid": "^2.4.3",
"@easyops-cn/docusaurus-search-local": "^0.36.0",
"@docusaurus/core": "^3.0.0",
"@docusaurus/preset-classic": "^3.0.0",
"@docusaurus/theme-mermaid": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@easyops-cn/docusaurus-search-local": "^0.38.0",
"by-node-env": "^2.0.1",
"clsx": "^2.1.1",
"react-dom": "^17.0.2",
"react-dom": "18.2.0",
"react": "^18.3.1",
"yaml-loader": "^0.8.1"
},
"resolutions": {},
"engines": {
"node": ">=18.0"
},
"browserslist": {
"production": [
">0.2%",
@ -35,4 +39,4 @@
"last 1 safari version"
]
}
}
}

6456
yarn.lock

File diff suppressed because it is too large Load Diff