diff --git a/docs/architecture_components.md b/docs/architecture_components.md index f9a806a7..293f99b6 100644 --- a/docs/architecture_components.md +++ b/docs/architecture_components.md @@ -2,28 +2,25 @@ title: "Components Architecture" --- -Home Assistant can be extended with **components**. Each component is responsible for a specific domain within Home Assistant. Components can listen for or trigger events, offer services, and maintain states. Components are written in Python and can do all the goodness that Python has to offer. Out of the box, Home Assistant offers a bunch of [built-in components]({{site_root}}/components/). +Home Assistant can be extended with **components**. Each component is responsible for a specific domain within Home Assistant. Components can listen for or trigger events, offer services, and maintain states. Components are written in Python and can do all the goodness that Python has to offer. Out of the box, Home Assistant offers a bunch of [built-in components](https://www.home-assistant.io/components/). -

-Diagram showing interaction between components and the Home Assistant core. -Diagram showing interaction between components and the Home Assistant core -

+Diagram showing interaction between components and the Home Assistant core. There are two types of components within Home Assistant: components that interact with an Internet of Things domain, and components that respond to events that happen within Home Assistant. Read on to learn about each type! -#### Components that interact with an Internet-of-Things domain +## Components that interact with an Internet-of-Things domain These components track devices within a specific domain and consist of a core part and platform-specific logic. These components make their information available via the State Machine and the Event Bus. The components also register services in the Service Registry to expose control of the devices. -For example, the built-in [`switch` component](/components/switch/) is responsible for interaction with different types of switches. A platform provides support for a particular kind or brand of device. For example, a switch could use a WeMo or Orvibo platform and a light component might interact with the Hue or LIFX platform. +For example, the built-in [`switch` component](https://www.home-assistant.io/components/switch/) is responsible for interaction with different types of switches. A platform provides support for a particular kind or brand of device. For example, a switch could use a WeMo or Orvibo platform and a light component might interact with the Hue or LIFX platform. -If you want to add support for a new platform, check out the [add new platform section](/developers/add_new_platform/). +If you want to add support for a new platform, check out the [add new platform section](creating_platform_index.md). -#### Components that respond to events that happen within Home Assistant +## Components that respond to events that happen within Home Assistant These components provide small pieces of home automation logic or involve services that do common tasks within your house. -For example, the [`device_sun_light_trigger` component](/components/device_sun_light_trigger/) tracks the state of devices and the sun to make sure that the lights are turned on when it gets dark and people are home. The component uses logic like this: +For example, the [`device_sun_light_trigger` component](https://www.home-assistant.io/components/device_sun_light_trigger/) tracks the state of devices and the sun to make sure that the lights are turned on when it gets dark and people are home. The component uses logic like this: ```text In the event that device 'Paulus Nexus 5' changes to the 'Home' state: @@ -43,17 +40,13 @@ In the event of the sun setting: Turn on the lights ``` -Look [here](/python_component_automation/) for a comprehensive example of a home automation component. - -### The full picture +## The full picture When we put all the different pieces of Home Assistant together, it's a close match for the initial home automation overview sketch. The smart home AI has not been implemented yet, so it's not included in this picture. -

- - - - Overview of the full Home Assistant architecture with a couple of loaded components and platforms -

+Overview of the full Home Assistant architecture with a couple of loaded components and platforms The platform logic for components uses third-party Python libraries to communicate with the devices. Through this, we can leverage some of the best libraries in the Python community. diff --git a/docs/architecture.md b/docs/architecture_index.md similarity index 62% rename from docs/architecture.md rename to docs/architecture_index.md index 24750290..c441b6f8 100644 --- a/docs/architecture.md +++ b/docs/architecture_index.md @@ -1,22 +1,20 @@ --- title: "Architecture" +sidebar_label: "Introduction" --- Before we dive into the Home Assistant architecture, let's get a clear overview of the home automation landscape as a whole. This way, we can show how the different parts of Home Assistant fit into the picture. -For more information about each part in this overview, check out our blog. Here's the tl;dr version of the blog: +For more information about each part in this overview, check out our blog. Here's the tl;dr version of the blog: * Home Control is responsible for collecting information and controlling devices. * Home Automation triggers commands based on user configurations. * Smart Home triggers commands based on previous behavior. -

- - Home Automation landscape - - Overview of the home automation landscape -

+Home Automation landscape The Home Assistant core is responsible for Home Control. Home Assistant contains four parts which make this possible: @@ -25,9 +23,7 @@ The Home Assistant core is responsible for Home Control. Home Assistant contains * **Service Registry**: listens on the event bus for `call_service` events and allows other code to register services. * **Timer**: sends a `time_changed` event every 1 second on the event bus. -

- - - - Overview of the Home Assistant core architecture -

+Overview of the Home Assistant core architecture diff --git a/docs/building_integrations.md b/docs/building_integrations.md new file mode 100644 index 00000000..339e9826 --- /dev/null +++ b/docs/building_integrations.md @@ -0,0 +1,5 @@ +--- +title: Building Integrations +--- + +Intro on how to build integrations. diff --git a/docs/component_loading.md b/docs/component_loading.md deleted file mode 100644 index d2808f1b..00000000 --- a/docs/component_loading.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Loading your components" ---- - -A component will be loaded on start if a section (ie. `light:`) for it exists in the config file. A component can also be loaded if another component is loaded that depends on it. When loading a component Home Assistant will check the following paths: - - * `/custom_components/` - * `homeassistant/components/` (built-in components) - -Once loaded, a component will only be setup if all dependencies can be loaded and are able to setup. Keep an eye on the logs to see if your component could be loaded and initialized. - -

-You can override a built-in component by having a component with the same name in your config/custom_components folder. If the built-in component is inside a subfolder, take care to place your customization in a folder with the same name in config/custom_components/*folder*. Note that overriding built-in components is not recommended and will probably break things! -

- -

-Home Assistant will use the directory that contains your config file as the directory that holds your customizations. By default this is the config folder in your current work directory. You can use a different folder by running Home Assistant with the --config argument: python3 homeassistant --config /YOUR/CONFIG/PATH/. -

diff --git a/docs/code_review_component.md b/docs/creating_component_code_review.md similarity index 90% rename from docs/code_review_component.md rename to docs/creating_component_code_review.md index 3cccb58b..8040938d 100644 --- a/docs/code_review_component.md +++ b/docs/creating_component_code_review.md @@ -4,9 +4,7 @@ title: "Checklist for creating a component" A checklist of things to do when you're adding a new component. -

-Not all existing platforms follow the requirements in this checklist. This cannot be used as a reason to not follow them! -

+> Not all existing platforms follow the requirements in this checklist. This cannot be used as a reason to not follow them! ### 1. Requirements diff --git a/docs/component_deps_and_reqs.md b/docs/creating_component_deps_and_reqs.md similarity index 79% rename from docs/component_deps_and_reqs.md rename to docs/creating_component_deps_and_reqs.md index ec864969..2a46c9df 100644 --- a/docs/component_deps_and_reqs.md +++ b/docs/creating_component_deps_and_reqs.md @@ -14,7 +14,7 @@ DEPENDENCIES = ['mqtt'] ## Requirements -Requirements are Python libraries or modules that you would normally install using `pip` for your component. Home Assistant will try to install the requirements into the `deps` subdirectory of the Home Assistant [configuration directory](/docs/configuration/) if you are not using a `venv` or in something like `path/to/venv/lib/python3.6/site-packages` if you running in a virtual environment. This will make sure that all requirements are present at startup. If steps fails like missing packages for the compilation of a module or other install errors, the component will fail to load. +Requirements are Python libraries or modules that you would normally install using `pip` for your component. Home Assistant will try to install the requirements into the `deps` subdirectory of the Home Assistant [configuration directory](https://www.home-assistant.io/docs/configuration/) if you are not using a `venv` or in something like `path/to/venv/lib/python3.6/site-packages` if you running in a virtual environment. This will make sure that all requirements are present at startup. If steps fails like missing packages for the compilation of a module or other install errors, the component will fail to load. Requirements is a list of strings. Each entry is a `pip` compatible string. For example, the media player Cast platform depends on the Python package PyChromecast v0.6.12: diff --git a/docs/component_discovery.md b/docs/creating_component_discovery.md similarity index 96% rename from docs/component_discovery.md rename to docs/creating_component_discovery.md index 165158fb..a374ab40 100644 --- a/docs/component_discovery.md +++ b/docs/creating_component_discovery.md @@ -2,9 +2,7 @@ title: "Component Discovery" --- -

-This option is only available for built-in components. -

+> This option is only available for built-in components. Home Assistant has a discovery service running in the background to discover new devices. Whenever a new device is discovered, a `SERVICE_DISCOVERED` event will be fired with the found service and the information. The `discovery` component has some knowledge about which components handle which type of services and will ensure those are loaded and listening before firing the `SERVICE_DISCOVERED` event. diff --git a/docs/component_events.md b/docs/creating_component_events.md similarity index 100% rename from docs/component_events.md rename to docs/creating_component_events.md diff --git a/docs/component_generic_discovery.md b/docs/creating_component_generic_discovery.md similarity index 100% rename from docs/component_generic_discovery.md rename to docs/creating_component_generic_discovery.md diff --git a/docs/creating_components.md b/docs/creating_component_index.md similarity index 78% rename from docs/creating_components.md rename to docs/creating_component_index.md index 31724c4c..fbba2f10 100644 --- a/docs/creating_components.md +++ b/docs/creating_component_index.md @@ -1,5 +1,6 @@ --- title: "Creating components" +sidebar_label: "Introduction" --- Alright, you're ready to make your first component. AWESOME. Don't worry, we've tried hard to keep it as easy as possible. @@ -16,5 +17,3 @@ def setup(hass, config): return True ``` - -For more examples, see the [Custom Python Component Examples](/cookbook/#custom-python-component-examples) on our examples page. diff --git a/docs/creating_component_loading.md b/docs/creating_component_loading.md new file mode 100644 index 00000000..c7cf29ad --- /dev/null +++ b/docs/creating_component_loading.md @@ -0,0 +1,14 @@ +--- +title: "Loading your components" +--- + +A component will be loaded on start if a section (ie. `light:`) for it exists in the config file. A component can also be loaded if another component is loaded that depends on it. When loading a component Home Assistant will check the following paths: + + * `/custom_components/` + * `homeassistant/components/` (built-in components) + +Once loaded, a component will only be setup if all dependencies can be loaded and are able to setup. Keep an eye on the logs to see if your component could be loaded and initialized. + +> You can override a built-in component by having a component with the same name in your config/custom_components folder. If the built-in component is inside a subfolder, take care to place your customization in a folder with the same name in config/custom_components/*folder*. Note that overriding built-in components is not recommended and will probably break things! + +> Home Assistant will use the directory that contains your config file as the directory that holds your customizations. By default this is the config folder in your current work directory. You can use a different folder by running Home Assistant with the --config argument: python3 homeassistant --config /YOUR/CONFIG/PATH/. diff --git a/docs/component_states.md b/docs/creating_component_states.md similarity index 100% rename from docs/component_states.md rename to docs/creating_component_states.md diff --git a/docs/code_review_platform.md b/docs/creating_platform_code_review.md similarity index 94% rename from docs/code_review_platform.md rename to docs/creating_platform_code_review.md index acd20e06..d4be58cc 100644 --- a/docs/code_review_platform.md +++ b/docs/creating_platform_code_review.md @@ -4,9 +4,7 @@ title: "Checklist for creating a platform" A checklist of things to do when you're adding a new platform. -

-Not all existing platforms follow the requirements in this checklist. This cannot be used as a reason to not follow them! -

+> Not all existing platforms follow the requirements in this checklist. This cannot be used as a reason to not follow them! ### 1. Requirements diff --git a/docs/platform_example_light.md b/docs/creating_platform_example_light.md similarity index 100% rename from docs/platform_example_light.md rename to docs/creating_platform_example_light.md diff --git a/docs/platform_example_sensor.md b/docs/creating_platform_example_sensor.md similarity index 100% rename from docs/platform_example_sensor.md rename to docs/creating_platform_example_sensor.md diff --git a/docs/add_new_platform.md b/docs/creating_platform_index.md similarity index 90% rename from docs/add_new_platform.md rename to docs/creating_platform_index.md index 6aea200e..937aae99 100644 --- a/docs/add_new_platform.md +++ b/docs/creating_platform_index.md @@ -1,5 +1,6 @@ --- title: "Adding support for a new platform" +sidebar_label: "Introduction" --- Components that interact with devices are called "[Entity Components](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity_component.py)." They are structured in core and platform logic, which means different brands can use the same logic to handle a light. @@ -8,8 +9,8 @@ For example, the built-in `switch` component consists of various platforms in [` If you're planning to add support for a new type of device to an existing component, you can get away with only writing platform logic. Have a look at how the component works with other platforms and create a similar file for the platform that you want to add: - - [Example sensor platform](/developers/platform_example_sensor): hello world of platforms. - - [Example light platform](/developers/platform_example_light): showing best practices. + - [Example sensor platform](creating_platform_example_sensor.md): hello world of platforms. + - [Example light platform](creating_platform_example_light.md): showing best practices. ### Interfacing with devices @@ -19,7 +20,7 @@ To integrate the third-party library, create an [Entity class](https://github.co ### Requirements and dependencies -Platforms can specify dependencies and requirements [the same way as components](/developers/component_deps_and_reqs): +Platforms can specify dependencies and requirements [the same way as components](creating_component_deps_and_reqs.md): ```python REQUIREMENTS = ['some-package==2.0.0', 'some-other-package==2.5.0'] diff --git a/docs/development_101.md b/docs/development_101.md index f75f1c10..f04585a3 100644 --- a/docs/development_101.md +++ b/docs/development_101.md @@ -2,15 +2,13 @@ title: "Development 101" --- -The goal of development 101 is to get you familiar with the basics of developing for Home Assistant. Before we start, please make sure you familiarize yourself with the [architecture]. +The goal of development 101 is to get you familiar with the basics of developing for Home Assistant. Before we start, please make sure you familiarize yourself with the [architecture](architecture_index.md). To get our code running inside Home Assistant we're going to create a custom component. The first step is to locate your config folder. You can find the path to your config folder by opening the Home Assistant frontend, click on the service developer tool icon. It's the path after the text "Path to configuration.yaml". Inside your configuration directory create a new folder called `custom_components`. It might be that one already exists, that's fine too. This is the folder that Home Assistant will look at when looking for custom code. -

-The Home Assistant API has two variants: a synchronous and an asynchronous version (asyncio). This development course will focus on the synchronous version. -

+> The Home Assistant API has two variants: a synchronous and an asynchronous version (asyncio). This development course will focus on the synchronous version. To verify that everything is working correctly, let's create a small Hello World component. To do so, create a file called `hello_world.py` in your custom components folder. Copy paste the following content to it: @@ -42,9 +40,7 @@ After running `hass`, we should see log entries stating that `hello_world` compo 2018-04-03 21:44:20 INFO (MainThread) [homeassistant.setup] Setting up hello_world ``` -

- -State card showing that Hello World component is working as intended. -

- -[architecture]: /developers/architecture/ +State card showing that Hello World component is working as intended. diff --git a/docs/development_checklist.md b/docs/development_checklist.md index 7459e32e..868703d9 100644 --- a/docs/development_checklist.md +++ b/docs/development_checklist.md @@ -9,5 +9,5 @@ Before you commit any changes, check your work against these requirements: - New dependencies are added to `requirements_all.txt` (if applicable), using `script/gen_requirements_all.py` - The `.coveragerc` file is updated to exclude your platform if there are no tests available or your new code uses a third-party library for communication with the device, service, or sensor - Documentation is developed for [home-assistant.io](/) - * It's OK to start with adding a docstring with configuration details (for example, sample entry for `configuration.yaml` file) to the file header. Visit the [website documentation](/developers/documentation/) for more information about contributing to [home-assistant.io](https://github.com/home-assistant/home-assistant.github.io). + * It's OK to start with adding a docstring with configuration details (for example, sample entry for `configuration.yaml` file) to the file header. Visit the [website documentation](documentation_index.md) for more information about contributing to [home-assistant.io](https://github.com/home-assistant/home-assistant.github.io). diff --git a/docs/development_environment.md b/docs/development_environment.md index 46a92a22..a8f12aaa 100644 --- a/docs/development_environment.md +++ b/docs/development_environment.md @@ -4,9 +4,9 @@ title: "Set up Development Environment" You'll need to set up a development environment if you want to develop a new feature or component for Home Assistant. Read on to learn how to set up. -### Preparing your environment +## Preparing your environment -#### Developing on Linux +### Developing on Linux Install the core dependencies. @@ -20,13 +20,11 @@ In order to run `script/setup` below you will need some more dependencies. $ sudo apt-get install libssl-dev libxml2-dev libxslt1-dev libjpeg-dev libffi-dev libudev-dev zlib1g-dev ``` -

-Different distributions have different package installation mechanisms and sometimes packages names as well. For example Centos would use: `sudo yum install epel-release && sudo yum install python34 python34-devel mysql-devel` -

+> Different distributions have different package installation mechanisms and sometimes packages names as well. For example Centos would use: `sudo yum install epel-release && sudo yum install python34 python34-devel mysql-devel` -Additional dependencies exist if you plan to perform Frontend Development, please read the [Frontend](/developers/frontend/) section to learn more. +Additional dependencies exist if you plan to perform Frontend Development, please read the [Frontend](frontend_index.md) section to learn more. -#### Developing on Windows +### Developing on Windows If you are using Windows as a development platform, make sure that you have the correct Microsoft [Visual C++ build tools](http://landinghub.visualstudio.com/visual-cpp-build-tools) installed. The installation of the most requirements and validation using `tox` will fail if this is not done correctly. Check the [Windows Compilers](https://wiki.python.org/moin/WindowsCompilers) section on the [Python website](https://www.python.org/) for details. @@ -57,7 +55,7 @@ Also, make sure to install or upgrade the `setuptools` Python package. It contai $ pip install --upgrade setuptools ``` -#### Developing on OS X +### Developing on OS X Install [Homebrew](https://brew.sh/), then use that to install Python 3: @@ -65,7 +63,7 @@ Install [Homebrew](https://brew.sh/), then use that to install Python 3: $ brew install python3 ``` -### Setup Local Repository +## Setup Local Repository Visit the [Home Assistant repository](https://github.com/home-assistant/home-assistant) and click **Fork**. Once forked, setup your local copy of the source using the commands: @@ -76,7 +74,7 @@ $ cd home-assistant $ git remote add upstream https://github.com/home-assistant/home-assistant.git ``` -### Setting up virtual environment +## Setting up virtual environment To isolate your environment from the rest of the system, set up a [`venv`](https://docs.python.org/3/library/venv.html). Within the `home-assistant` directory, create and activate your virtual environment. @@ -96,8 +94,8 @@ Invoke your installation. $ hass ``` -### Logging +## Logging By default logging in home-assistant is tuned for operating in production (set to INFO by default, with some modules set to even less verbose logging levels). -You can use the [logger](/components/logger/) component to adjust logging to DEBUG to see even more details about what is going on. +You can use the [logger](https://www.home-assistant.io/components/logger/) component to adjust logging to DEBUG to see even more details about what is going on. diff --git a/docs/development_events.md b/docs/development_events.md index 98582599..630a8b7f 100644 --- a/docs/development_events.md +++ b/docs/development_events.md @@ -8,7 +8,7 @@ The event system is very flexible. There are no limitations on the event type, a [List of events that Home Assistant fires.][object] -### Firing events +## Firing events To fire an event, you have to interact with the event bus. The event bus is available on the Home Assistant instance as `hass.bus`. @@ -26,7 +26,7 @@ def setup(hass, config): }) ``` -### Listening to events +## Listening to events Most of the times you'll not be firing events but instead listen to events. For example, the state change of an entity is broadcasted as an event. @@ -47,9 +47,9 @@ def setup(hass, config): hass.bus.listen('my_cool_event', handle_event) ``` -#### Helpers +### Helpers Home Assistant comes with a lot of bundled helpers to listen to specific types of event. There are helpers to track a point in time, to track a time interval, a state change or the sun set. [See available methods.][helpers] [helpers]: https://dev-docs.home-assistant.io/en/master/api/helpers.html#module-homeassistant.helpers.event -[object]: /docs/configuration/events/ +[object]: https://www.home-assistant.io/docs/configuration/events/ diff --git a/docs/development_guidelines.md b/docs/development_guidelines.md index cb15a80e..920e5f17 100644 --- a/docs/development_guidelines.md +++ b/docs/development_guidelines.md @@ -49,7 +49,7 @@ https://home-assistant.io/components/light.mqtt/ ### Requirements -Please place [Platform requirements](/developers/code_review_platform/#1-requirements) right after the imports. +Please place [Platform requirements](creating_platform_code_review.md#1-requirements) right after the imports. ```python [...] diff --git a/docs/development.md b/docs/development_index.md similarity index 98% rename from docs/development.md rename to docs/development_index.md index 79238b11..2750aac7 100644 --- a/docs/development.md +++ b/docs/development_index.md @@ -1,5 +1,6 @@ --- title: "Starting with Development" +sidebar_label: Introduction --- Home Assistant is built from the ground up to be easily extensible using components. Home Assistant uses [Python 3](https://www.python.org/) for the backend and [Polymer (Web components)](https://www.polymer-project.org/) for the frontend. diff --git a/docs/development_states.md b/docs/development_states.md index c6ac2c62..b6e78f10 100644 --- a/docs/development_states.md +++ b/docs/development_states.md @@ -8,9 +8,9 @@ Home Assistant keeps track of the states of entities in a state machine. The sta - Each state has a primary attribute that describes the state of the entity. In the case of a light this could be for example "on" and "off". You can store anything you want in the state, as long as it's a string (will be converted if it's not). - You can store more information about an entity by setting attributes. Attributes is a dictionary that can contain any data that you want. The only requirement is that it's JSON serializable, so you're limited to numbers, strings, dictionaries and lists. -[Description of the state object.](/docs/configuration/state_object/) +[Description of the state object.](https://www.home-assistant.io/docs/configuration/state_object/) -### Using states in your component +## Using states in your component This is a simple tutorial/example on how to create and set states. We will do our work in a component called "hello_state". The purpose of this component is to display a given text in the frontend. @@ -40,7 +40,7 @@ def setup(hass, config): 1. In the file header we decided to add some details: A short description and the link to the documentation. 2. We want to do some logging. This means that we import the Python logging module and create an alias. 3. The component name is equal to the domain name. -4. At the moment this component has no dependencies. For detail check [dependencies](/developers/component_deps_and_reqs/#dependencies) section. +4. At the moment this component has no dependencies. For detail check [dependencies](creating_component_deps_and_reqs.md#dependencies) section. 5. The `setup` function will take care of the initialization of our component. The component will only write a log message. Keep in mind for later that you have several options for the severity: @@ -126,8 +126,6 @@ def device_state_attributes(self): return self._attributes ``` -

-Entities also have a similar property `state_attributes`, which normally doesn't need to be defined by new platforms. This property is used by base components to add standard sets of attributes to a state. Example: The light component uses `state_attributes` to add brightness to the state dictionary. If you are designing a new component, you should define `state_attributes` instead. -

+> Entities also have a similar property `state_attributes`, which normally doesn't need to be defined by new platforms. This property is used by base components to add standard sets of attributes to a state. Example: The light component uses `state_attributes` to add brightness to the state dictionary. If you are designing a new component, you should define `state_attributes` instead. -To get your component included in the Home Assistant releases, follow the steps described in the [Submit your work](/developers/development_submitting/) section. Basically you only need to move your component in the `homeassistant/component/` directory of your fork and create a Pull Request. +To get your component included in the Home Assistant releases, follow the steps described in the [Submit your work](development_submitting.md) section. Basically you only need to move your component in the `homeassistant/component/` directory of your fork and create a Pull Request. diff --git a/docs/development_submitting.md b/docs/development_submitting.md index d8fa3c24..e832fd50 100644 --- a/docs/development_submitting.md +++ b/docs/development_submitting.md @@ -8,11 +8,11 @@ Submit your improvements, fixes, and new features to Home Assistant one at a tim `git checkout -b some-feature` - 2. Make your changes, create a [new platform](/developers/add_new_platform/), develop a [new component](/developers/creating_components/), or fix [issues](https://github.com/home-assistant/home-assistant/issues). + 2. Make your changes, create a [new platform](creating_platform_index.md), develop a [new component](creating_component_index.md), or fix [issues](https://github.com/home-assistant/home-assistant/issues). - 3. [Test your changes](/developers/development_testing/) and check for style violations. + 3. [Test your changes](development_testing.md) and check for style violations. - 4. If everything looks good according to these [musts](/developers/development_checklist/), commit your changes: + 4. If everything looks good according to these [musts](development_checklist.md), commit your changes: `git add .` diff --git a/docs/development_testing.md b/docs/development_testing.md index a211c378..fbca68be 100644 --- a/docs/development_testing.md +++ b/docs/development_testing.md @@ -2,7 +2,7 @@ title: "Testing your code" --- -As states in the [Style guidelines section](/developers/development_guidelines/) all code is checked to verify all unit tests pass and that the code passes the linting tools. Local testing is done using Tox, which has been installed as part of running `script/setup`. To start the tests, simply run it: +As states in the [Style guidelines section](development_guidelines.md) all code is checked to verify all unit tests pass and that the code passes the linting tools. Local testing is done using Tox, which has been installed as part of running `script/setup`. To start the tests, simply run it: ```bash $ tox diff --git a/docs/development_validation.md b/docs/development_validation.md index 3be196da..1050a14e 100644 --- a/docs/development_validation.md +++ b/docs/development_validation.md @@ -14,7 +14,7 @@ Besides [voluptuous](https://pypi.python.org/pypi/voluptuous) default types, man - Time: `time`, `time_zone` - Misc: `template`, `slug`, `temperature_unit`, `latitude`, `longitude`, `isfile`, `sun_event`, `ensure_list`, `port`, `url`, and `icon` -To validate platforms using [MQTT](/components/mqtt/), `valid_subscribe_topic` and `valid_publish_topic` are available. +To validate platforms using [MQTT](https://www.home-assistant.io/components/mqtt/), `valid_subscribe_topic` and `valid_publish_topic` are available. Some things to keep in mind: diff --git a/docs/documentation_create_page.md b/docs/documentation_create_page.md index 005c645b..9ac716bf 100644 --- a/docs/documentation_create_page.md +++ b/docs/documentation_create_page.md @@ -98,9 +98,8 @@ If you are don't escape templates then they will be rendered and appear blank on The direct usage of HTML is supported but not recommended. The note boxes are an exception. ```html -

- You need to enable telnet on your router. -

+Hello
+World ``` ### Images, icons, and logos diff --git a/docs/documentation_index.md b/docs/documentation_index.md index 155825ff..2bb84b5f 100644 --- a/docs/documentation_index.md +++ b/docs/documentation_index.md @@ -26,11 +26,8 @@ Then you can work on the documentation: - Create a Pull Request (PR) against the **next** branch of home-assistant.github.io if your documentation is a new feature, platform, or component. - Create a Pull Request (PR) against the **current** branch of home-assistant.github.io if you fix stuff, create Cookbook entries, or expand existing documentation. -

-It could be necessary that you run `rake generate` prior to `rake preview` for the very first preview. -

-

-Site generated by `rake` is only available locally. If you are developing on a headless machine use port forwarding: -`ssh -L 4000:localhost:4000 user_on_headless_machine@ip_of_headless_machine` -

+> It could be necessary that you run `rake generate` prior to `rake preview` for the very first preview. + +> Site generated by `rake` is only available locally. If you are developing on a headless machine use port forwarding: +`ssh -L 4000:localhost:4000 user_on_headless_machine@ip_of_headless_machine` diff --git a/docs/external_api_rest.md b/docs/external_api_rest.md index a77347c7..263cd2ca 100644 --- a/docs/external_api_rest.md +++ b/docs/external_api_rest.md @@ -7,9 +7,9 @@ Home Assistant runs a web server accessible on port 8123. * http://IP_ADDRESS:8123/ is an interface to control Home Assistant. * http://IP_ADDRESS:8123/api/ is a Rest API. -The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header `X-HA-Access: YOUR_PASSWORD` (YOUR_PASSWORD as specified in your `configuration.yaml` file in the [`http:` section](/components/http/)). +The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header `X-HA-Access: YOUR_PASSWORD` (YOUR_PASSWORD as specified in your `configuration.yaml` file in the [`http:` section](https://www.home-assistant.io/components/http/)). -If you are not using the [`frontend`](/components/frontend/) in your setup then you need to add the [`api` component](/components/api/) to your `configuration.yaml` file. +If you are not using the [`frontend`](https://www.home-assistant.io/components/frontend/) in your setup then you need to add the [`api` component](https://www.home-assistant.io/components/api/) to your `configuration.yaml` file. There are multiple ways to consume the Home Assistant Rest API. One is with `curl`: @@ -33,9 +33,7 @@ response = get(url, headers=headers) print(response.text) ``` -

-You can append `?api_password=YOUR_PASSWORD` to any URL to log in automatically. -

+> You can append `?api_password=YOUR_PASSWORD` to any URL to log in automatically. Successful calls will return status code 200 or 201. Other status codes that can return are: @@ -446,13 +444,11 @@ $ curl -X POST \ http://localhost:8123/api/services/mqtt/publish ``` -

-The result will include any states that changed while the service was being executed, even if their change was the result of something else happening in the system. -

+> The result will include any states that changed while the service was being executed, even if their change was the result of something else happening in the system. #### POST /api/template -Render a Home Assistant template. [See template docs for more information.](/topics/templating/) +Render a Home Assistant template. [See template docs for more information.](https://www.home-assistant.io/topics/templating/) ```json { @@ -517,7 +513,3 @@ It will return a message if event forwarding was canceled successfully. "message": "Event forwarding cancelled." } ``` - -

-If your client does not support DELETE HTTP requests you can add an optional attribute _METHOD and set its value to DELETE. -

diff --git a/docs/external_api_python.md b/docs/external_api_rest_python.md similarity index 91% rename from docs/external_api_python.md rename to docs/external_api_rest_python.md index 90c48bf5..b5855ec6 100644 --- a/docs/external_api_python.md +++ b/docs/external_api_rest_python.md @@ -1,12 +1,12 @@ --- -title: "Python Remote API" +title: "Python bindings for the REST API" --- See the [developer documentation][devdocs] for a full overview of the documentation. The rest of this page will contain examples on how to use it. [devdocs]: https://dev-docs.home-assistant.io/en/master/api/homeassistant.html#module-homeassistant.remote -In the package [`homeassistant.remote`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/remote.py) a Python API on top of the [HTTP API](/developers/api/) can be found. If you are not using the [`frontend`](/components/frontend/) in your setup then you need to add the [`api` component](/components/api/) to your `configuration.yaml` file to use the Python Remote API. +In the package [`homeassistant.remote`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/remote.py) a Python API on top of the [HTTP API](https://www.home-assistant.io/developers/api/) can be found. If you are not using the [`frontend`](https://www.home-assistant.io/components/frontend/) in your setup then you need to add the [`api` component](https://www.home-assistant.io/components/api/) to your `configuration.yaml` file to use the Python Remote API. A simple way to get all current entities is to visit the "Set State" page in the "Developer Tools". For the examples below just choose one from the available entries. Here the sensor `sensor.office_temperature` and the switch `switch.livingroom_pin_2` are used. @@ -33,7 +33,7 @@ print(remote.get_config(api)) ### Get details about services, events, and entitites -The output from this is similar to the output you'd find via the frontend, using the [Developer Tools](/docs/tools/dev-tools/). +The output from this is similar to the output you'd find via the frontend, using the [Developer Tools](https://www.home-assistant.io/docs/tools/dev-tools/). ```python import homeassistant.remote as remote @@ -197,7 +197,7 @@ for entity in entities: ### Show difference between `last_changed` and `last_updated` -The documentation about the [State Objects](/docs/configuration/state_object/) describes the +The documentation about the [State Objects](https://www.home-assistant.io/docs/configuration/state_object/) describes the `last_changed` and `last_updated` fields. This example shows how it works in practice. ```python diff --git a/docs/external_api_server_sent_events.md b/docs/external_api_server_sent_events.md index edc28e4e..f49e9e1d 100644 --- a/docs/external_api_server_sent_events.md +++ b/docs/external_api_server_sent_events.md @@ -2,13 +2,13 @@ title: "Server-sent events" --- -The [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) feature is a one-way channel from your Home Assistant server to a client which is acting as a consumer. For bi-directional communication check the [RESTful API](/developers/rest_api/) and [Python API](/developers/python_api/). +The [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) feature is a one-way channel from your Home Assistant server to a client which is acting as a consumer. For bi-directional communication check the [RESTful API](https://www.home-assistant.io/developers/rest_api/) and [Python API](https://www.home-assistant.io/developers/python_api/). The URI that is generating the data is `/api/stream`. A requirement on the client-side is existing support for the [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) interface. -There are various ways to access the stream. If you have not set an `api_password` in the [`http`](/components/http/) section of your `configuration.yaml` file then you use your modern browser to read the messages. A command-line option is `curl`: +There are various ways to access the stream. If you have not set an `api_password` in the [`http`](https://www.home-assistant.io/components/http/) section of your `configuration.yaml` file then you use your modern browser to read the messages. A command-line option is `curl`: ```bash $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ diff --git a/docs/external_api_websocket.md b/docs/external_api_websocket.md index a7ae308c..420d5147 100644 --- a/docs/external_api_websocket.md +++ b/docs/external_api_websocket.md @@ -10,7 +10,7 @@ Home Assistant contains a WebSocket API. This API can be used to stream informat Connect your websocket implementation to `ws://localhost:8123/api/websocket`. -If you are not using the [`frontend`](/components/frontend/) in your setup then you need to add the [`websocket_api` component](/components/websocket_api/) to your `configuration.yaml` file to use the WebSocket API. +If you are not using the [`frontend`](https://www.home-assistant.io/components/frontend/) in your setup then you need to add the [`websocket_api` component](https://www.home-assistant.io/components/websocket_api/) to your `configuration.yaml` file to use the WebSocket API. ## Server states diff --git a/docs/frontend_add_card.md b/docs/frontend_add_card.md index 893a0a5f..c9ab71c1 100644 --- a/docs/frontend_add_card.md +++ b/docs/frontend_add_card.md @@ -4,13 +4,13 @@ title: "Adding state card" The main interface of Home Assistant is a list of the current entities and their states. For each entity in the system, a state card will be rendered. State cards will show an icon, the name of the entity, when the state has last changed and the current state or a control to interact with it. -![Cards in the frontend](/images/frontend/frontend-cards1.png) +![Cards in the frontend](/img/en/frontend/frontend-cards1.png) The different card types can be found [here](https://github.com/home-assistant/home-assistant-polymer/tree/master/src/state-summary). -Sensors, when not [grouped](/components/group/), are shown as so-called badges on top of the state cards. +Sensors, when not grouped, are shown as so-called badges on top of the state cards. -![Badges in the frontend](/images/frontend/frontend-badges.png) +![Badges in the frontend](/img/en/frontend/frontend-badges.png) The different badges are located in the file [`/src/components/entity/ha-state-label-badge.html`](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/components/entity/ha-state-label-badge.html). diff --git a/docs/frontend_add_more_info.md b/docs/frontend_add_more_info.md index 002391bb..78537918 100644 --- a/docs/frontend_add_more_info.md +++ b/docs/frontend_add_more_info.md @@ -4,10 +4,10 @@ title: "Adding more info dialogs" Whenever the user taps or clicks on one of the cards, a more info dialog will show. The header of this dialog will be the state card, followed by the history of this entity for the last 24 hours. Below this the more info component is rendered for that entity. The more info component can show more information or allow more ways of control. -

- - The more info dialog for a light allows the user to control the color and the brightness. -

+The more info dialog for a light allows the user to control the color and the brightness. The instructions to add a more info dialog are very similar to adding a new card type. This example will add a new more info component for the domain `camera`: diff --git a/docs/frontend_creating_custom_panels.md b/docs/frontend_creating_custom_panels.md index ccf4feaf..c04b660e 100644 --- a/docs/frontend_creating_custom_panels.md +++ b/docs/frontend_creating_custom_panels.md @@ -6,7 +6,7 @@ Panels are pages within Home Assistant that show information within Home Assista Besides components registering panels, users can also register panels using the `panel_custom` component. This allows users to quickly build their own custom interfaces for Home Assistant. -### Before you get started +## Before you get started The Home Assistant user interface is currently served to browsers in modern JavaScript and older JavaScript (ES5). The older version has a wider browser support but that comes at a cost of size, performance and more difficult to get started building panels for authors. @@ -17,7 +17,7 @@ frontend: javascript_version: latest ``` -### Building your first panel +## Building your first panel Create a file called `hello.html` in your /panels/. @@ -80,5 +80,3 @@ panel_custom: sidebar_icon: mdi:hand-pointing-right url_path: hello ``` - -For more possibilities, see the [Custom panel section](/cookbook/#user-interface) on our Examples page. diff --git a/docs/frontend_creating_custom_ui.md b/docs/frontend_creating_custom_ui.md index 3a359581..211efe6f 100644 --- a/docs/frontend_creating_custom_ui.md +++ b/docs/frontend_creating_custom_ui.md @@ -2,9 +2,9 @@ title: "Creating custom UI" --- -If you would like to use your own [State card](/developers/frontend_add_card/) without merging your code into [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer/) you can create your own implementation. +If you would like to use your own [State card](frontend_add_card.md) without merging your code into [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer/) you can create your own implementation. -Put the element source file and its dependencies in `www/custom_ui/` directory under your Home Assistant [configuration](/docs/configuration/) directory. +Put the element source file and its dependencies in `www/custom_ui/` directory under your Home Assistant [configuration](https://www.home-assistant.io/docs/configuration/) directory. For example if creating a state card for the `light` domain named `state-card-my-custom-light` put `state-card-my-custom-light.html` in `www/custom_ui/`. @@ -84,8 +84,7 @@ class StateCardMyCustomLight extends Polymer.Element { customElements.define(StateCardMyCustomLight.is, StateCardMyCustomLight); ``` -

-Some browsers don't support latest ECMAScript standards, these require a separate ES5 compatible file (`extra_html_url_es5`). -

-For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page. +> Some browsers don't support latest ECMAScript standards, these require a separate ES5 compatible file (`extra_html_url_es5`). + +For more possibilities, see the [Custom UI section](https://www.home-assistant.io/cookbook/#user-interface) on our Examples page. diff --git a/docs/frontend.md b/docs/frontend_index.md similarity index 91% rename from docs/frontend.md rename to docs/frontend_index.md index c09736fc..e3fea499 100644 --- a/docs/frontend.md +++ b/docs/frontend_index.md @@ -1,18 +1,15 @@ --- title: "Frontend development" +sidebar_label: "Introduction" --- Home Assistant is built on top of the [Polymer](https://www.polymer-project.org/) webcomponents framework. Polymer allows building encapsulated custom HTML elements. [Home-Assistant-Polymer source code on GitHub.][hass-polymer] -

-Do not use development mode in production. Home Assistant uses aggressive caching to improve the mobile experience. This is disabled during development so that you do not have to restart the server in between changes. -

+> Do not use development mode in production. Home Assistant uses aggressive caching to improve the mobile experience. This is disabled during development so that you do not have to restart the server in between changes. ## Setting up the environment -

-All commands below need to be run from inside the home-assistant-polymer repository. -

+> All commands below need to be run from inside the home-assistant-polymer repository. Home Assistant will by default serve the compiled version of the frontend from the hass_frontend Python package. For development you want to work with the unbundled source files which are in the home-assistant-polymer repository. diff --git a/docs/hassio_addon_publishing.md b/docs/hassio_addon_publishing.md index 49be1660..3bfc74e6 100644 --- a/docs/hassio_addon_publishing.md +++ b/docs/hassio_addon_publishing.md @@ -50,8 +50,6 @@ For a local repository: $ docker run --rm --privileged -v ~/.docker:/root/.docker -v /my_addon:/data homeassistant/amd64-builder --all -t /data ``` -

-If you are developing on macOS and using Docker for Mac, you may encounter an error message similar to the following: error creating aufs mount to /var/lib/docker/aufs/mnt/-init: invalid argument. A proposed workaround is to add the following to the Advanced Daemon JSON configuration via Docker > Preferences > Daemon > Advanced: "storage-driver" : "aufs". -

+> If you are developing on macOS and using Docker for Mac, you may encounter an error message similar to the following: error creating aufs mount to /var/lib/docker/aufs/mnt/-init: invalid argument. A proposed workaround is to add the following to the Advanced Daemon JSON configuration via Docker > Preferences > Daemon > Advanced: "storage-driver" : "aufs". [builder]: https://github.com/home-assistant/hassio-build/tree/master/builder diff --git a/docs/hassio_debugging.md b/docs/hassio_debugging.md index db7f3250..f39eb581 100644 --- a/docs/hassio_debugging.md +++ b/docs/hassio_debugging.md @@ -2,9 +2,7 @@ title: "Debugging Hass.io" --- -

-This section is not for users. Use the [SSH add-on] to SSH into Hass.io. This is for developers of Hass.io. Do not ask for support if you are using these options. -

+> This section is not for users. Use the [SSH add-on] to SSH into Hass.io. This is for developers of Hass.io. Do not ask for support if you are using these options. [SSH add-on]: /addons/ssh/ @@ -22,9 +20,7 @@ Follow steps 1-4 under 'Generating a new SSH key' (The other sections are not ap Step 3 in the link above, shows the path to the private key file `id_rsa` for your chosen operating system. Your public key, `id_rsa.pub`, is saved in the same folder. Next, select all text from text box "Public key for pasting into OpenSSH authorized_keys file" and save it to the root of your SD card as `authorized_keys`. -

-Make sure when you are copying the public key to the root of the /resin-boot partition of the SD card that you rename the file correctly to `authorized_keys` with no `.pub` file extension. -

+> Make sure when you are copying the public key to the root of the /resin-boot partition of the SD card that you rename the file correctly to `authorized_keys` with no `.pub` file extension. You should then be able to SSH into your Hass.io device. On mac/linux, use: ``` diff --git a/docs/intent_index.md b/docs/intent_index.md index ba1ee981..29933464 100644 --- a/docs/intent_index.md +++ b/docs/intent_index.md @@ -1,13 +1,17 @@ --- title: "Intents" +sidebar_label: "Introduction" --- An intent is a description of a user's intention. Intents are generated by user actions, like asking Amazon Echo to turn on a light. -

- -Architectural overview of intents in Home Assistant -

+ + Architectural overview of intents in Home Assistant + + Intents are fired by components that receive them from external sources/services. Conversation, Alexa, API.ai and Snips are currently sourcing intents. diff --git a/docs/internationalization_translation.md b/docs/internationalization_translation.md index 6371ef39..eb422489 100644 --- a/docs/internationalization_translation.md +++ b/docs/internationalization_translation.md @@ -10,9 +10,7 @@ Translations for Home Assistant are managed through Lokalise, an online translat For more information about the translation workflow, please see the [Lokalise translation workflow documents](https://docs.lokalise.co/category/iOzEuQPS53-for-team-leads-and-translators). -

-The translation of the Home Assistant frontend is still a work in progress. More phrases will be available for translation soon. -

+> The translation of the Home Assistant frontend is still a work in progress. More phrases will be available for translation soon. ## Translation placeholders @@ -33,9 +31,7 @@ English Name: German Native Name: Deutsch ``` -

-Region specific translations (`en-US`, `fr-CA`) will only be included if translations for that region need to differ from the base language translation. -

+> Region specific translations (`en-US`, `fr-CA`) will only be included if translations for that region need to differ from the base language translation. ### Maintainer steps to add a new language 1. Language tags have to follow [BCP 47](https://tools.ietf.org/html/bcp47). A list of most language tags can be found here: [IANA sutbtag registry](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). Examples: `fr`, `fr-CA`, `zh-Hans`. Only include the country code if country specific overrides are being included, and the base language is already translated. diff --git a/website/blog-examples-from-docusaurus/2016-03-11-blog-post.md b/website/blog-examples-from-docusaurus/2016-03-11-blog-post.md deleted file mode 100755 index cf2ba296..00000000 --- a/website/blog-examples-from-docusaurus/2016-03-11-blog-post.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Blog Title -author: Blog Author -authorURL: http://twitter.com/ -authorFBID: 100002976521003 ---- - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien. - - - -Mauris vestibulum ullamcorper nibh, ut semper purus pulvinar ut. Donec volutpat orci sit amet mauris malesuada, non pulvinar augue aliquam. Vestibulum ultricies at urna ut suscipit. Morbi iaculis, erat at imperdiet semper, ipsum nulla sodales erat, eget tincidunt justo dui quis justo. Pellentesque dictum bibendum diam at aliquet. Sed pulvinar, dolor quis finibus ornare, eros odio facilisis erat, eu rhoncus nunc dui sed ex. Nunc gravida dui massa, sed ornare arcu tincidunt sit amet. Maecenas efficitur sapien neque, a laoreet libero feugiat ut. - -Nulla facilisi. Maecenas sodales nec purus eget posuere. Sed sapien quam, pretium a risus in, porttitor dapibus erat. Sed sit amet fringilla ipsum, eget iaculis augue. Integer sollicitudin tortor quis ultricies aliquam. Suspendisse fringilla nunc in tellus cursus, at placerat tellus scelerisque. Sed tempus elit a sollicitudin rhoncus. Nulla facilisi. Morbi nec dolor dolor. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras et aliquet lectus. Pellentesque sit amet eros nisi. Quisque ac sapien in sapien congue accumsan. Nullam in posuere ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin lacinia leo a nibh fringilla pharetra. - -Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin venenatis lectus dui, vel ultrices ante bibendum hendrerit. Aenean egestas feugiat dui id hendrerit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur in tellus laoreet, eleifend nunc id, viverra leo. Proin vulputate non dolor vel vulputate. Curabitur pretium lobortis felis, sit amet finibus lorem suscipit ut. Sed non mollis risus. Duis sagittis, mi in euismod tincidunt, nunc mauris vestibulum urna, at euismod est elit quis erat. Phasellus accumsan vitae neque eu placerat. In elementum arcu nec tellus imperdiet, eget maximus nulla sodales. Curabitur eu sapien eget nisl sodales fermentum. - -Phasellus pulvinar ex id commodo imperdiet. Praesent odio nibh, sollicitudin sit amet faucibus id, placerat at metus. Donec vitae eros vitae tortor hendrerit finibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque vitae purus dolor. Duis suscipit ac nulla et finibus. Phasellus ac sem sed dui dictum gravida. Phasellus eleifend vestibulum facilisis. Integer pharetra nec enim vitae mattis. Duis auctor, lectus quis condimentum bibendum, nunc dolor aliquam massa, id bibendum orci velit quis magna. Ut volutpat nulla nunc, sed interdum magna condimentum non. Sed urna metus, scelerisque vitae consectetur a, feugiat quis magna. Donec dignissim ornare nisl, eget tempor risus malesuada quis. diff --git a/website/blog-examples-from-docusaurus/2017-04-10-blog-post-two.md b/website/blog-examples-from-docusaurus/2017-04-10-blog-post-two.md deleted file mode 100644 index 3ab4637b..00000000 --- a/website/blog-examples-from-docusaurus/2017-04-10-blog-post-two.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: New Blog Post -author: Blog Author -authorURL: http://twitter.com/ -authorFBID: 100002976521003 ---- - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien. - - - -Mauris vestibulum ullamcorper nibh, ut semper purus pulvinar ut. Donec volutpat orci sit amet mauris malesuada, non pulvinar augue aliquam. Vestibulum ultricies at urna ut suscipit. Morbi iaculis, erat at imperdiet semper, ipsum nulla sodales erat, eget tincidunt justo dui quis justo. Pellentesque dictum bibendum diam at aliquet. Sed pulvinar, dolor quis finibus ornare, eros odio facilisis erat, eu rhoncus nunc dui sed ex. Nunc gravida dui massa, sed ornare arcu tincidunt sit amet. Maecenas efficitur sapien neque, a laoreet libero feugiat ut. - -Nulla facilisi. Maecenas sodales nec purus eget posuere. Sed sapien quam, pretium a risus in, porttitor dapibus erat. Sed sit amet fringilla ipsum, eget iaculis augue. Integer sollicitudin tortor quis ultricies aliquam. Suspendisse fringilla nunc in tellus cursus, at placerat tellus scelerisque. Sed tempus elit a sollicitudin rhoncus. Nulla facilisi. Morbi nec dolor dolor. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras et aliquet lectus. Pellentesque sit amet eros nisi. Quisque ac sapien in sapien congue accumsan. Nullam in posuere ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin lacinia leo a nibh fringilla pharetra. - -Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin venenatis lectus dui, vel ultrices ante bibendum hendrerit. Aenean egestas feugiat dui id hendrerit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur in tellus laoreet, eleifend nunc id, viverra leo. Proin vulputate non dolor vel vulputate. Curabitur pretium lobortis felis, sit amet finibus lorem suscipit ut. Sed non mollis risus. Duis sagittis, mi in euismod tincidunt, nunc mauris vestibulum urna, at euismod est elit quis erat. Phasellus accumsan vitae neque eu placerat. In elementum arcu nec tellus imperdiet, eget maximus nulla sodales. Curabitur eu sapien eget nisl sodales fermentum. - -Phasellus pulvinar ex id commodo imperdiet. Praesent odio nibh, sollicitudin sit amet faucibus id, placerat at metus. Donec vitae eros vitae tortor hendrerit finibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque vitae purus dolor. Duis suscipit ac nulla et finibus. Phasellus ac sem sed dui dictum gravida. Phasellus eleifend vestibulum facilisis. Integer pharetra nec enim vitae mattis. Duis auctor, lectus quis condimentum bibendum, nunc dolor aliquam massa, id bibendum orci velit quis magna. Ut volutpat nulla nunc, sed interdum magna condimentum non. Sed urna metus, scelerisque vitae consectetur a, feugiat quis magna. Donec dignissim ornare nisl, eget tempor risus malesuada quis. diff --git a/website/blog-examples-from-docusaurus/2017-09-25-testing-rss.md b/website/blog-examples-from-docusaurus/2017-09-25-testing-rss.md deleted file mode 100644 index b7ff8129..00000000 --- a/website/blog-examples-from-docusaurus/2017-09-25-testing-rss.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Adding RSS Support - RSS Truncation Test -author: Eric Nakagawa -authorURL: http://twitter.com/ericnakagawa -authorFBID: 661277173 ---- -1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - -This should be truncated. - -This line should never render in XML. diff --git a/website/blog-examples-from-docusaurus/2017-09-26-adding-rss.md b/website/blog-examples-from-docusaurus/2017-09-26-adding-rss.md deleted file mode 100644 index eeb4f047..00000000 --- a/website/blog-examples-from-docusaurus/2017-09-26-adding-rss.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Adding RSS Support -author: Eric Nakagawa -authorURL: http://twitter.com/ericnakagawa -authorFBID: 661277173 ---- - -This is a test post. - -A whole bunch of other information. diff --git a/website/blog-examples-from-docusaurus/2017-10-24-new-version-1.0.0.md b/website/blog-examples-from-docusaurus/2017-10-24-new-version-1.0.0.md deleted file mode 100644 index 60761c02..00000000 --- a/website/blog-examples-from-docusaurus/2017-10-24-new-version-1.0.0.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: New Version 1.0.0 -author: Eric Nakagawa -authorURL: http://twitter.com/ericnakagawa -authorFBID: 661277173 ---- - -This blog post will test file name parsing issues when periods are present. diff --git a/website/core/Footer.js b/website/core/Footer.js index b43f1d6a..3f607d3e 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -33,7 +33,7 @@ class Footer extends React.Component { /> )} - */} - - Facebook Open Source -
{this.props.config.copyright}
); diff --git a/website/i18n/en.json b/website/i18n/en.json index c3a7084d..714c6ffb 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -4,23 +4,27 @@ "next": "Next", "previous": "Previous", "tagline": "All you need to start developing for Home Assistant", - "add_new_platform": "Adding support for a new platform", "architecture_components": "Components Architecture", - "architecture": "Architecture", + "architecture_index": "Architecture", + "Introduction": "Introduction", "asyncio_101": "Asyncio 101", "asyncio_categorizing_functions": "Categorizing Functions", "asyncio_misc": "Miscellaneous Async", "asyncio_working_with_async": "Working with Async", "asyncio": "asyncio", - "code_review_component": "Checklist for creating a component", - "code_review_platform": "Checklist for creating a platform", - "component_deps_and_reqs": "Requirements & Dependencies", - "component_discovery": "Component Discovery", - "component_events": "Handling events", - "component_generic_discovery": "Generic Platform Discovery", - "component_loading": "Loading your components", - "component_states": "Handling states", - "creating_components": "Creating components", + "building_integrations": "Building Integrations", + "creating_component_code_review": "Checklist for creating a component", + "creating_component_deps_and_reqs": "Requirements & Dependencies", + "creating_component_discovery": "Component Discovery", + "creating_component_events": "Handling events", + "creating_component_generic_discovery": "Generic Platform Discovery", + "creating_component_index": "Creating components", + "creating_component_loading": "Loading your components", + "creating_component_states": "Handling states", + "creating_platform_code_review": "Checklist for creating a platform", + "creating_platform_example_light": "Example light platform", + "creating_platform_example_sensor": "Example sensor platform", + "creating_platform_index": "Adding support for a new platform", "development_101": "Development 101", "development_catching_up": "Catching up with Reality", "development_checklist": "Development Checklist", @@ -29,16 +33,16 @@ "development_events": "Using Events", "development_guidelines": "Style guidelines", "development_hass_object": "Hass object", + "development_index": "Starting with Development", "development_services": "Using Services", "development_states": "Using States", "development_submitting": "Submit your work", "development_testing": "Testing your code", "development_validation": "Validate the input", - "development": "Starting with Development", "documentation_create_page": "Create a new page", "documentation_index": "Documentation Home Assistant", "documentation_standards": "Documentation Standards", - "external_api_python": "Python Remote API", + "external_api_rest_python": "Python bindings for the REST API", "external_api_rest": "RESTful API", "external_api_server_sent_events": "Server-sent events", "external_api_websocket": "WebSocket API", @@ -46,7 +50,7 @@ "frontend_add_more_info": "Adding more info dialogs", "frontend_creating_custom_panels": "Creating custom panels", "frontend_creating_custom_ui": "Creating custom UI", - "frontend": "Frontend development", + "frontend_index": "Frontend development", "hassio_addon_communication": "Add-On Communication", "hassio_addon_config": "Add-On Configuration", "hassio_addon_development": "Developing an add-on", @@ -68,23 +72,21 @@ "internationalization_translation": "Translation", "maintenance": "Maintenance", "misc": "Miscellaneous", - "platform_example_light": "Example light platform", - "platform_example_sensor": "Example sensor platform", "releasing": "Releasing", "Architecture": "Architecture", - "Developers": "Developers", + "Frontend": "Frontend", + "Backend": "Backend", + "External APIs": "External APIs", "Misc": "Misc", "Intents": "Intents", - "Catch all category": "Catch all category", - "Documentation": "Documentation", - "Maintainer docs": "Maintainer docs", - "Frontend": "Frontend", "Development": "Development", - "Internationalization": "Internationalization", - "Hass.io": "Hass.io", "Creating Platforms": "Creating Platforms", "Creating Components": "Creating Components", - "External API": "External API" + "External API": "External API", + "Internationalization": "Internationalization", + "Hass.io": "Hass.io", + "Documentation": "Documentation", + "Maintainer docs": "Maintainer docs" }, "pages-strings": { "Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)|no description given": "Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)", diff --git a/website/pages/en/index.js b/website/pages/en/index.js index d6db81ee..e9883da7 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -19,13 +19,66 @@ function imgUrl(img) { } function docUrl(doc, language) { - return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc; + return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc + ".html"; } function pageUrl(page, language) { return siteConfig.baseUrl + (language ? language + '/' : '') + page; } + +const PopularTopicsSection = ({ language }) => ( +
+ +
+
+

Documentation Structure

+

+ Architecture. Discusses the architecture of the various layers that make up Home Assistant. +

+

+ Frontend. Discusses how to develop the user interface of Home Assistant. +

+

+ Backend. Discusses how to build new integrations for Home Assistant. +

+

+ External APIs. Documentation of the various APIs to extract data from Home Assistant. +

+

+ Misc. Internationalization, asyncio, Hass.io, updating documentation. +

+
+ + +
+
+
+); + + class Button extends React.Component { render() { return ( @@ -57,10 +110,15 @@ const Logo = props => ( ); const ProjectTitle = props => ( -

- {siteConfig.title} - {siteConfig.tagline} -

+
+

+ Home Assistant + Developer documentation +

+
+ Not a developer? Go to the normal website +
+
); const PromoSection = props => ( @@ -76,14 +134,14 @@ class HomeSplash extends React.Component { let language = this.props.language || ''; return ( - +
- + {/* - + */}
); @@ -95,24 +153,36 @@ const Block = props => ( padding={['bottom', 'top']} id={props.id} background={props.background}> - + ); const Features = props => ( - + {[ { - content: 'This is the content of my feature', - image: imgUrl('docusaurus.svg'), + title: 'Intents', + content: 'Build powerful voice interactions', + image: imgUrl('logo-responsive.svg'), imageAlign: 'top', - title: 'Feature One', }, { - content: 'The content of my second feature', - image: imgUrl('docusaurus.svg'), + title: 'Frontend Panels', + content: 'Add a custom panel to control our component or provide rich user interface.', + image: imgUrl('logo-responsive.svg'), + imageAlign: 'top', + }, + { + title: 'Build powerful automations', + content: 'Use the power of Python to built any advanced automation that you can dream off.', + image: imgUrl('logo-responsive.svg'), + imageAlign: 'top', + }, + { + title: 'Websocket API', + content: 'Use the websocket API to get instantly notified of any change.', + image: imgUrl('logo-responsive.svg'), imageAlign: 'top', - title: 'Feature Two', }, ]} @@ -132,7 +202,7 @@ const LearnHow = props => ( {[ { content: 'Talk about learning how to use this', - image: imgUrl('docusaurus.svg'), + image: imgUrl('logo-responsive.svg'), imageAlign: 'right', title: 'Learn How', }, @@ -145,7 +215,7 @@ const TryOut = props => ( {[ { content: 'Talk about trying this out', - image: imgUrl('docusaurus.svg'), + image: imgUrl('logo-responsive.svg'), imageAlign: 'left', title: 'Try it Out', }, @@ -158,7 +228,7 @@ const Description = props => ( {[ { content: 'This is another description of how this project is useful', - image: imgUrl('docusaurus.svg'), + image: imgUrl('logo-responsive.svg'), imageAlign: 'right', title: 'Description', }, @@ -166,6 +236,7 @@ const Description = props => ( ); + const Showcase = props => { if ((siteConfig.users || []).length === 0) { return null; @@ -196,6 +267,13 @@ const Showcase = props => { ); }; +const IntroSection = ({ language }) => ( +
+ + +
+) + class Index extends React.Component { render() { let language = this.props.language || ''; @@ -203,13 +281,15 @@ class Index extends React.Component { return (
-
- +
+ + + {/* - + */}
); diff --git a/website/sidebars.json b/website/sidebars.json index 1f22f771..ce8d9ea8 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -1,40 +1,31 @@ { "Architecture": { "Architecture": [ - "architecture", + "architecture_index", "architecture_components" ], "Intents": [ - "intent_conversation", + "intent_index", "intent_firing", "intent_handling", - "intent_index" - ], - "Catch all category": [ - "index" - ], - "Documentation": [ - "documentation_create_page", - "documentation_index", - "documentation_standards" - ], - "Maintainer docs": [ - "maintenance", - "releasing" + "intent_conversation" ] }, - "Frontend": { + "Extending Frontend": { "Frontend": [ - "frontend", + "frontend_index", "frontend_add_card", "frontend_add_more_info", "frontend_creating_custom_panels", "frontend_creating_custom_ui" ] }, - "Development": { + "Extending HASS": { + "Introduction": [ + "building_integrations" + ], "Development": [ - "development", + "development_index", "development_101", "development_catching_up", "development_checklist", @@ -49,10 +40,39 @@ "development_testing", "development_validation" ], + "Creating Platforms": [ + "creating_platform_index", + "creating_platform_code_review", + "creating_platform_example_light", + "creating_platform_example_sensor" + ], + "Creating Components": [ + "creating_component_index", + "creating_component_code_review", + "creating_component_deps_and_reqs", + "creating_component_discovery", + "creating_component_events", + "creating_component_generic_discovery", + "creating_component_loading", + "creating_component_states" + ] + }, + "External APIs": { + "External API": [ + "external_api_rest", + "external_api_rest_python", + "external_api_websocket", + "external_api_server_sent_events" + ] + }, + "Misc": { + "Introduction": [ + "misc" + ], "Internationalization": [ + "internationalization_index", "internationalization_backend_localization", "internationalization_custom_component_localization", - "internationalization_index", "internationalization_translation" ], "asyncio": [ @@ -61,9 +81,7 @@ "asyncio_categorizing_functions", "asyncio_misc", "asyncio_working_with_async" - ] - }, - "Hass.io": { + ], "Hass.io": [ "hassio_addon_communication", "hassio_addon_config", @@ -75,32 +93,15 @@ "hassio_addon_tutorial", "hassio_architecture", "hassio_debugging" - ] - }, - "Building Integrations": { - "Creating Platforms": [ - "add_new_platform", - "code_review_platform", - "platform_example_light", - "platform_example_sensor" ], - "Creating Components": [ - "code_review_component", - "component_deps_and_reqs", - "component_discovery", - "component_events", - "component_generic_discovery", - "component_loading", - "component_states", - "creating_components" - ] - }, - "APIs": { - "External API": [ - "external_api_python", - "external_api_rest", - "external_api_server_sent_events", - "external_api_websocket" + "Documentation": [ + "documentation_create_page", + "documentation_index", + "documentation_standards" + ], + "Maintainer docs": [ + "maintenance", + "releasing" ] } } diff --git a/website/siteConfig.js b/website/siteConfig.js index 91a2bb97..cdf52de1 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -36,15 +36,11 @@ const siteConfig = { // For no header links in the top nav bar -> headerLinks: [], headerLinks: [ - {doc: 'architecture', label: 'Architecture'}, - {doc: 'index', label: 'Developers'}, - {doc: 'index', label: 'Developers'}, - {doc: 'index', label: 'Developers'}, + {doc: 'architecture_index', label: 'Architecture'}, + {doc: 'frontend_index', label: 'Frontend'}, + {doc: 'building_integrations', label: 'Backend'}, + {doc: 'external_api_rest', label: 'External APIs'}, {doc: 'misc', label: 'Misc'}, - {doc: 'index', label: 'Developers'}, - // {doc: 'doc4', label: 'API'}, - // {page: 'help', label: 'Help'}, - // {blog: true, label: 'Blog'}, ], // If you have users set above, you add it here: diff --git a/website/static/css/custom.css b/website/static/css/custom.css index 220c1dde..a03ef88a 100644 --- a/website/static/css/custom.css +++ b/website/static/css/custom.css @@ -1,5 +1,15 @@ /* your custom css */ +.homeContainer .projectTitle, +.indexPage h2 { + color: rgb(33, 33, 33) !important; +} + +.introSection { + padding-bottom: 20px; +} + + @media only screen and (min-device-width: 360px) and (max-device-width: 736px) { } diff --git a/website/static/img/en/architecture/component_interaction.png b/website/static/img/en/architecture/component_interaction.png new file mode 100644 index 00000000..fc33f781 Binary files /dev/null and b/website/static/img/en/architecture/component_interaction.png differ diff --git a/website/static/img/en/architecture/ha_architecture.svg b/website/static/img/en/architecture/ha_architecture.svg new file mode 100644 index 00000000..dbe41b93 --- /dev/null +++ b/website/static/img/en/architecture/ha_architecture.svg @@ -0,0 +1,856 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + Home AssistantCore Architecture + + Timer + + Event Bus + + StateMachine + listen for events/fire event + + ServiceRegistry + + + + Light + + + + Many more... + Device Tracker + Switch + Components + set state + + + + + + + + call event listeners + publishservice + callservice + + + call_serviceevents + + service_calledevents + time_changedevents + state_changedevents + + diff --git a/website/static/img/en/architecture/ha_full_architecture.png b/website/static/img/en/architecture/ha_full_architecture.png new file mode 100644 index 00000000..0b574864 Binary files /dev/null and b/website/static/img/en/architecture/ha_full_architecture.png differ diff --git a/website/static/img/en/architecture/home_automation_landscape.svg b/website/static/img/en/architecture/home_automation_landscape.svg new file mode 100644 index 00000000..c0fbca28 --- /dev/null +++ b/website/static/img/en/architecture/home_automation_landscape.svg @@ -0,0 +1,904 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + Lights + + + + Smart Home + + HomeAutomation + User + + Configuration + + Home Control + Commands + Information + + + + Switches + Many more... + Internet of Things + + + + + Commands + Information + Information + Commands + Information(ie. light is on) + Commands(ie. turn light on) + Graphic by Paulus Schoutsen 2014, CC BY 4.0 + + diff --git a/website/static/img/en/dev-tools/about-icon.png b/website/static/img/en/dev-tools/about-icon.png new file mode 100644 index 00000000..80a51e6d Binary files /dev/null and b/website/static/img/en/dev-tools/about-icon.png differ diff --git a/website/static/img/en/dev-tools/events-icon.png b/website/static/img/en/dev-tools/events-icon.png new file mode 100644 index 00000000..51cc34f4 Binary files /dev/null and b/website/static/img/en/dev-tools/events-icon.png differ diff --git a/website/static/img/en/dev-tools/mqtt-icon.png b/website/static/img/en/dev-tools/mqtt-icon.png new file mode 100644 index 00000000..3ecfd427 Binary files /dev/null and b/website/static/img/en/dev-tools/mqtt-icon.png differ diff --git a/website/static/img/en/dev-tools/services-icon.png b/website/static/img/en/dev-tools/services-icon.png new file mode 100644 index 00000000..f7805355 Binary files /dev/null and b/website/static/img/en/dev-tools/services-icon.png differ diff --git a/website/static/img/en/dev-tools/states-icon.png b/website/static/img/en/dev-tools/states-icon.png new file mode 100644 index 00000000..b425c96c Binary files /dev/null and b/website/static/img/en/dev-tools/states-icon.png differ diff --git a/website/static/img/en/dev-tools/templates-icon.png b/website/static/img/en/dev-tools/templates-icon.png new file mode 100644 index 00000000..b8ddc151 Binary files /dev/null and b/website/static/img/en/dev-tools/templates-icon.png differ diff --git a/website/static/img/en/frontend/frontend-badges.png b/website/static/img/en/frontend/frontend-badges.png new file mode 100644 index 00000000..4d36f07b Binary files /dev/null and b/website/static/img/en/frontend/frontend-badges.png differ diff --git a/website/static/img/en/frontend/frontend-cards1.png b/website/static/img/en/frontend/frontend-cards1.png new file mode 100644 index 00000000..3dc047f1 Binary files /dev/null and b/website/static/img/en/frontend/frontend-cards1.png differ diff --git a/website/static/img/en/frontend/frontend-more-info-light.png b/website/static/img/en/frontend/frontend-more-info-light.png new file mode 100644 index 00000000..5b4d6d48 Binary files /dev/null and b/website/static/img/en/frontend/frontend-more-info-light.png differ diff --git a/website/static/img/en/intents/overview.png b/website/static/img/en/intents/overview.png new file mode 100644 index 00000000..9a21be48 Binary files /dev/null and b/website/static/img/en/intents/overview.png differ diff --git a/website/static/img/oss_logo.png b/website/static/img/oss_logo.png deleted file mode 100644 index 8183e289..00000000 Binary files a/website/static/img/oss_logo.png and /dev/null differ