Fix GitHub repository links and use dev branch when possible (#971)

This commit is contained in:
Franck Nijhof 2021-06-18 14:08:47 +02:00 committed by GitHub
parent 9e67de6b8a
commit bbf7781378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 53 additions and 53 deletions

View File

@ -10,6 +10,6 @@ With the release of Home Assistant 0.70, we've migrated the build pipeline for o
This might impact you if you dependend on some of this. Examples are Polymer (`window.Polymer`) or one of our utilitity functions that used to be available as `window.hassUtil`, `window.HAWS` or `window.hassMixins`.
To give developers time to migrate, we're adding a temporary legacy support layer that will expose some of our internals again on the `window` object. We've already added `window.Polymer`, `window.Polymer.Element` and `window.Polymer.html`. If you're using other specific things from the window object, [please let us know](https://github.com/home-assistant/home-assistant-polymer/issues/1157).
To give developers time to migrate, we're adding a temporary legacy support layer that will expose some of our internals again on the `window` object. We've already added `window.Polymer`, `window.Polymer.Element` and `window.Polymer.html`. If you're using other specific things from the window object, [please let us know](https://github.com/home-assistant/frontend/issues/1157).
Th legacy support layer will no longer be included in releases happening after July 2018.

View File

@ -12,7 +12,7 @@ Efforts to modernize and localize the frontend are moving full speed. This blog
Custom panels allow developers to build panels that will plug into the Home Assistant user interface, with the same possibilities like our other panels like history, map etc. The Home Assistant frontend will manage authentication and the subscription for states of the backend, the panel only has to take care of displaying the data and can offer users option to control things (calling services etc).
This support has been around for a while, but last week we've spend some time [polishing](https://github.com/home-assistant/home-assistant/pull/14708) our support and have three new additions:
This support has been around for a while, but last week we've spend some time [polishing](https://github.com/home-assistant/core/pull/14708) our support and have three new additions:
First new feature is that we now allow importing a panel from a JavaScript URL. This is going to be the preferred way to distribute panels moving forward. This also means that you can refer to a panel hosted externally. The user will have to approve before external panels get loaded. It's still possible for users to host it locally (and no approval is needed) by copying the panel to `<config dir>/www/your-panel.js` and use `/local/your-panel.js` as the url.
@ -24,4 +24,4 @@ Third new feature is that we now make a [starter kit](https://github.com/home-as
If you're building custom UI, odds are that you're using either `<state-info>` and `<ha-relative-time>`. Although not officially supported as external facing API, we still want to give a heads up that it's going to be needed to pass the `hass` object in.
This is necessary because `<ha-relative-time>` can now be localized thanks to c727 in [#1241](https://github.com/home-assistant/home-assistant-polymer/pull/1241.)
This is necessary because `<ha-relative-time>` can now be localized thanks to c727 in [#1241](https://github.com/home-assistant/frontend/pull/1241.)

View File

@ -15,7 +15,7 @@ For Home Assistant 0.73, I've sprinted together with [@awarecan] to ensure that
- If you opt-in for the new system, the API password will no longer work.
- To not force a hard break with the ecosystem around Home Assistant, a temporary legacy mode has been added to turn API password support back on. This will be removed in the future.
**The system is not yet ready for mainstream consumption**, we still need to add Hass.io support and a user interface to help guiding the user to create their first user account and to manage users. You can follow (and join!) the work to be done [here](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3Aauth).
**The system is not yet ready for mainstream consumption**, we still need to add Hass.io support and a user interface to help guiding the user to create their first user account and to manage users. You can follow (and join!) the work to be done [here](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3Aauth).
If you're interested in trying it out, keep on reading.

View File

@ -10,4 +10,4 @@ With the release of Home Assistant 0.76, the functions in the `homeassistant.rem
The reason for removing is two-fold: first the code is not being used inside Home Assistant and thus should not be part of Home Assistant. Second, it is not compatible with the new auth system nor do we want to spend the time to make it compatible.
If you want to keep using the methods in `homeassistant.remote`, feel free to copy [the code](https://github.com/home-assistant/home-assistant/blob/0.75.0/homeassistant/remote.py) to your own project.
If you want to keep using the methods in `homeassistant.remote`, feel free to copy [the code](https://github.com/home-assistant/core/blob/0.75.0/homeassistant/remote.py) to your own project.

View File

@ -17,7 +17,7 @@ With all these changes, we had to drop a few deprecated things and change some b
- A platform will now always require the component, if available, to be set up first.
- It is no longer possible to provide translations for components that are contained in a single Python file. Convert them to an integration in [a directory](/docs/creating_integration_file_structure).
- If you want to override a built-in integration, you need to specify a `manifest.json` for your custom integration. Note that we strongly discourage overriding built-in integrations. Instead, if you want to run an integration with custom changes change the integration name. For example if you want to run a custom version of the MQTT integration, named `mqtt` in Home Assistant:
- Copy the content of the `mqtt` folder from [the Home Assistant repository](https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/mqtt) to a new folder `<config>/custom_components/mqtt_custom/`
- Copy the content of the `mqtt` folder from [the Home Assistant repository](https://github.com/home-assistant/core/tree/dev/homeassistant/components/mqtt) to a new folder `<config>/custom_components/mqtt_custom/`
- Open `mqtt_custom/manifest.json` and change the value for `domain` from `mqtt` to `mqtt_custom`
- Open `mqtt_custom/__init__.py` and change the value of `DOMAIN` from `mqtt` to `mqtt_custom`
- Anywhere in your config where you referenced `mqtt`, reference `mqtt_custom`. So use `mqtt_custom:` to specify the host and use `platform: mqtt_custom` when specifying platforms.

View File

@ -32,7 +32,7 @@ A gist of the changes:
- The `is_on` property has been removed. If a device is able to turn off, it should include the hvac mode `HVAC_MODE_OFF`.
- Property names have been aligned, anything ending with "\_list" is now named "\_modes".
If you are a maintainer of an integration that has a climate platform or maintain a custom component that has one, make sure you [follow the pull request](https://github.com/home-assistant/home-assistant/pull/23899) and test your integration during the beta to make sure that it works like expected.
If you are a maintainer of an integration that has a climate platform or maintain a custom component that has one, make sure you [follow the pull request](https://github.com/home-assistant/core/pull/23899) and test your integration during the beta to make sure that it works like expected.
<!--truncate-->

View File

@ -41,7 +41,7 @@ Below is a screenshot of our CI pipeline for Home Assistant. Because all work is
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.
Another optimization that we do is that we use our own base images for the test runners. These images already have the correct Python and other base utilities installed. We add them to the [resources](https://github.com/home-assistant/home-assistant/blob/de3d28d9d5bd5dd69cf9f84d021d683da2c322d6/azure-pipelines-ci.yml#L12-L18), and then later reference them in the [strategy](https://github.com/home-assistant/home-assistant/blob/de3d28d9d5bd5dd69cf9f84d021d683da2c322d6/azure-pipelines-ci.yml#L72-L80) section.
Another optimization that we do is that we use our own base images for the test runners. These images already have the correct Python and other base utilities installed. We add them to the [resources](https://github.com/home-assistant/core/blob/de3d28d9d5bd5dd69cf9f84d021d683da2c322d6/azure-pipelines-ci.yml#L12-L18), and then later reference them in the [strategy](https://github.com/home-assistant/core/blob/de3d28d9d5bd5dd69cf9f84d021d683da2c322d6/azure-pipelines-ci.yml#L72-L80) section.
CircleCI had a nice feature that it could distribute your tests over multiple workers by keeping track of the duration of each test. This was reducing the duration of the PyTest suite to around 10 minutes. This is using more agents and we would quickly run out of agents, creating a big backlog. Subsequent stages are only enqueued once the “Overview” stage finishes, causing them to be in the queue behind other contributions that came in.
@ -73,7 +73,7 @@ To speed this up, were leveraging Python Wheels. Wheels are a binary format t
A special wheels format that can target many platforms with a single build. We are unable to use that because it is not compatible with musl libc, which is what Alpine uses.
This pipeline is triggered automatically when a contribution has been accepted and merged into development and it changed any requirements ([pipeline definition](https://github.com/home-assistant/home-assistant/blob/de3d28d9d5bd5dd69cf9f84d021d683da2c322d6/azure-pipelines-wheels.yml#L3-L10)). We also run it daily to make sure that all changes have been captured.
This pipeline is triggered automatically when a contribution has been accepted and merged into development and it changed any requirements ([pipeline definition](https://github.com/home-assistant/core/blob/de3d28d9d5bd5dd69cf9f84d021d683da2c322d6/azure-pipelines-wheels.yml#L3-L10)). We also run it daily to make sure that all changes have been captured.
Because installation using a wheel is significantly faster, we also offer custom integrations to [register themselves](https://github.com/home-assistant/custom-components-wheels). We will scan each custom integration once a day to make sure we have wheels for the Python packages that they use.
@ -87,7 +87,7 @@ Home Assistant does a stable release every three weeks. Prior to this stable rel
Each release will need to be built as a standalone Python package, and a Docker container for each of the five supported CPU architectures.
This pipeline is triggered whenever a [new release is tagged](https://github.com/home-assistant/home-assistant/blob/dev/azure-pipelines-release.yml#L3-L7). We first verify that the tag name matches the version in the code and that the release was created by one of our whitelisted release managers. We will then automatically build all the releases and publish them.
This pipeline is triggered whenever a [new release is tagged](https://github.com/home-assistant/core/blob/dev/azure-pipelines-release.yml#L3-L7). We first verify that the tag name matches the version in the code and that the release was created by one of our whitelisted release managers. We will then automatically build all the releases and publish them.
## Building Hass.io add-ons

View File

@ -28,10 +28,10 @@ Scenes allow a user to define how a light should look (ie, it should be on and t
Scenes are a powerful tool that is easy to understand for users. It's therefore important that we improve our scene support. We have prepared the following issues:
- [Add `scene.create` service to create scenes on the fly.](https://github.com/home-assistant/home-assistant/issues/27023)
- ~~[Add `scene.apply` service to apply a scene defined as service data.](https://github.com/home-assistant/home-assistant/issues/26813)~~
- ~~[Add activate scene to script syntax](https://github.com/home-assistant/home-assistant/issues/27026)~~
- [Add reproduce state support to entity integrations.](https://github.com/home-assistant/home-assistant/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+reproduce_state+is%3Aopen+) (multiple issues)
- [Add `scene.create` service to create scenes on the fly.](https://github.com/home-assistant/core/issues/27023)
- ~~[Add `scene.apply` service to apply a scene defined as service data.](https://github.com/home-assistant/core/issues/26813)~~
- ~~[Add activate scene to script syntax](https://github.com/home-assistant/core/issues/27026)~~
- [Add reproduce state support to entity integrations.](https://github.com/home-assistant/core/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+reproduce_state+is%3Aopen+) (multiple issues)
<!--truncate-->
@ -41,9 +41,9 @@ Device Automations are a device-oriented way for users to create automations. Wh
Device automations rely on integrations to define the possible options for each device. As this is a new technology, we still are looking for help in making all our entity integrations (light, switch etc) support this. We have prepared the following issues:
- [Add device trigger support to entity integrations](https://github.com/home-assistant/home-assistant/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+device_trigger+is%3Aopen+) (multiple issues)
- [Add device condition support to entity integrations](https://github.com/home-assistant/home-assistant/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+device_condition+is%3Aopen+) (multiple issues)
- [Add device action support to entity integrations](https://github.com/home-assistant/home-assistant/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+device_action+is%3Aopen+) (multiple issues)
- [Add device trigger support to entity integrations](https://github.com/home-assistant/core/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+device_trigger+is%3Aopen+) (multiple issues)
- [Add device condition support to entity integrations](https://github.com/home-assistant/core/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+device_condition+is%3Aopen+) (multiple issues)
- [Add device action support to entity integrations](https://github.com/home-assistant/core/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+device_action+is%3Aopen+) (multiple issues)
## Home Assistant Documentation
@ -57,9 +57,9 @@ Guess what is never done? Documentation.
We also have some work to do on the Frontend of Home Assistant.
So we have also prepared some issues to get you started:
- [Make all text translatable](https://github.com/home-assistant/home-assistant-polymer/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+label%3Alocalization+is%3Aopen+) (multiple issues)
- [Help making Home Assistant better accessible](https://github.com/home-assistant/home-assistant-polymer/issues?q=is%3Aopen+label%3AHacktoberfest+label%3Aaccessibility) (multiple issues)
- [And a lot of other small UX issues](https://github.com/home-assistant/home-assistant-polymer/labels/Hacktoberfest?page=2&q=is%3Aopen+label%3AHacktoberfest)
- [Make all text translatable](https://github.com/home-assistant/frontend/issues?utf8=%E2%9C%93&q=label%3AHacktoberfest+label%3Alocalization+is%3Aopen+) (multiple issues)
- [Help making Home Assistant better accessible](https://github.com/home-assistant/frontend/issues?q=is%3Aopen+label%3AHacktoberfest+label%3Aaccessibility) (multiple issues)
- [And a lot of other small UX issues](https://github.com/home-assistant/frontend/labels/Hacktoberfest?page=2&q=is%3Aopen+label%3AHacktoberfest)
## Bonus: Almond - Virtual Assistant

View File

@ -82,7 +82,7 @@ By focusing energy on simple mode, we are making Home Assistant easier to use fo
A great recent example of a feature that was driven by simple mode, but is beneficial for everyone is device automations. With device automations it is a breeze to configure Zigbee remotes. You can just pick from a list the button that should trigger your automation. Compare this to the old way of doing it: learn that you need to listen for `zha_event` in the event dev tool, then press the button to learn the event data to match on with an event trigger.
Another ongoing effort that will make it easier for everyone is our Hacktoberfest focus on making scenes a [first-class citizen](https://github.com/home-assistant/home-assistant/issues/25681).
Another ongoing effort that will make it easier for everyone is our Hacktoberfest focus on making scenes a [first-class citizen](https://github.com/home-assistant/core/issues/25681).
## Comments

View File

@ -31,4 +31,4 @@ const element = helpers.createRowElement(config);
element.hass = this.hass;
```
For more info see https://github.com/home-assistant/home-assistant-polymer/pull/4853
For more info see https://github.com/home-assistant/frontend/pull/4853

View File

@ -12,7 +12,7 @@ We currently only support built-in mfa auth modules. Support for custom auth mod
Multi-factor Auth modules are defined in `homeassistant/auth/mfa_modules/<name of module>.py`. The auth module will need to provide an implementation of the `MultiFactorAuthModule` class.
For an example of a fully implemented auth module, please see [insecure_example.py](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/auth/mfa_modules/insecure_example.py).
For an example of a fully implemented auth module, please see [insecure_example.py](https://github.com/home-assistant/core/blob/dev/homeassistant/auth/mfa_modules/insecure_example.py).
Multi-factor Auth modules shall extend the following methods of `MultiFactorAuthModule` class.

View File

@ -14,7 +14,7 @@ We currently only support built-in auth providers. Support for custom auth provi
Auth providers are defined in `homeassistant/auth/providers/<name of provider>.py`. The auth provider module will need to provide an implementation of the `AuthProvider` class and `LoginFlow` class, it is what asks user for information and validates it base on `data_entry_flow`.
For an example of a fully implemented auth provider, please see [insecure_example.py](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/auth/providers/insecure_example.py).
For an example of a fully implemented auth provider, please see [insecure_example.py](https://github.com/home-assistant/core/blob/dev/homeassistant/auth/providers/insecure_example.py).
Auth providers shall extend the following methods of `AuthProvider` class.

View File

@ -96,12 +96,12 @@ digraph G {
During startup, Home Assistant first calls the [normal component setup](/creating_component_index.md),
and then call the method `async_setup_entry(hass, entry)` for each entry. If a new Config Entry is
created at runtime, Home Assistant will also call `async_setup_entry(hass, entry)` ([example](https://github.com/home-assistant/home-assistant/blob/0.68.0/homeassistant/components/hue/__init__.py#L119)).
created at runtime, Home Assistant will also call `async_setup_entry(hass, entry)` ([example](https://github.com/home-assistant/core/blob/0.68.0/homeassistant/components/hue/__init__.py#L119)).
### For platforms
If a component includes platforms, it will need to forward the Config Entry to the platform. This can
be done by calling the forward function on the config entry manager ([example](https://github.com/home-assistant/home-assistant/blob/0.68.0/homeassistant/components/hue/bridge.py#L81)):
be done by calling the forward function on the config entry manager ([example](https://github.com/home-assistant/core/blob/0.68.0/homeassistant/components/hue/bridge.py#L81)):
```python
# Use `hass.async_create_task` to avoid a circular dependency between the platform and the component
@ -112,7 +112,7 @@ hass.async_create_task(
)
```
For a platform to support config entries, it will need to add a setup entry method ([example](https://github.com/home-assistant/home-assistant/blob/0.68.0/homeassistant/components/light/hue.py#L60)):
For a platform to support config entries, it will need to add a setup entry method ([example](https://github.com/home-assistant/core/blob/0.68.0/homeassistant/components/light/hue.py#L60)):
```python
async def async_setup_entry(hass, config_entry, async_add_devices):
@ -121,7 +121,7 @@ async def async_setup_entry(hass, config_entry, async_add_devices):
## Unloading entries
Components can optionally support unloading a config entry. When unloading an entry, the component needs to clean up all entities, unsubscribe any event listener and close all connections. To implement this, add `async_unload_entry(hass, entry)` to your component ([example](https://github.com/home-assistant/home-assistant/blob/0.68.0/homeassistant/components/hue/__init__.py#L136)).
Components can optionally support unloading a config entry. When unloading an entry, the component needs to clean up all entities, unsubscribe any event listener and close all connections. To implement this, add `async_unload_entry(hass, entry)` to your component ([example](https://github.com/home-assistant/core/blob/0.68.0/homeassistant/components/hue/__init__.py#L136)).
For each platform that you forwarded the config entry to, you will need to forward the unloading too.

View File

@ -3,7 +3,7 @@ title: Alarm Control Panel Entity
sidebar_label: Alarm Control Panel
---
An alarm control panel entity controls an alarm. Derive a platform entity from [`homeassistant.components.alarm_control_panel.AlarmControlPanelEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/alarm_control_panel/__init__.py).
An alarm control panel entity controls an alarm. Derive a platform entity from [`homeassistant.components.alarm_control_panel.AlarmControlPanelEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/alarm_control_panel/__init__.py).
## Properties

View File

@ -3,7 +3,7 @@ title: Climate Entity
sidebar_label: Climate
---
A climate entity controls temperature, humidity, or fans, such as A/C systems and humidifiers. Derive a platform entity from [`homeassistant.components.climate.ClimateEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/climate/__init__.py)
A climate entity controls temperature, humidity, or fans, such as A/C systems and humidifiers. Derive a platform entity from [`homeassistant.components.climate.ClimateEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/climate/__init__.py)
## Properties

View File

@ -3,7 +3,7 @@ title: Cover Entity
sidebar_label: Cover
---
A cover entity controls an opening or cover, such as a garage door or a window shade. Derive a platform entity from [`homeassistant.components.cover.CoverEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/cover/__init__.py).
A cover entity controls an opening or cover, such as a garage door or a window shade. Derive a platform entity from [`homeassistant.components.cover.CoverEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/cover/__init__.py).
## Properties

View File

@ -3,7 +3,7 @@ title: Fan Entity
sidebar_label: Fan
---
A fan entity is a device that controls the different vectors of your fan such as speed, direction and oscillation. Derive entity platforms from ['homeassistant.components.fan.FanEntity'](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/fan/__init__.py).
A fan entity is a device that controls the different vectors of your fan such as speed, direction and oscillation. Derive entity platforms from ['homeassistant.components.fan.FanEntity'](https://github.com/home-assistant/core/blob/dev/homeassistant/components/fan/__init__.py).
## Properties

View File

@ -3,7 +3,7 @@ title: Humidifier Entity
sidebar_label: Humidifier
---
A humidifier entity is a device whose main purpose is to control humidity, i.e. a humidifier or dehumidifier. Derive entity platforms from [`homeassistant.components.humidifier.HumidifierEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/humidifier/__init__.py)
A humidifier entity is a device whose main purpose is to control humidity, i.e. a humidifier or dehumidifier. Derive entity platforms from [`homeassistant.components.humidifier.HumidifierEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/humidifier/__init__.py)
## Properties

View File

@ -4,7 +4,7 @@ sidebar_label: Light
---
A light entity controls the brightness, hue and saturation color value, white value, color temperature and effects of a light source. Derive platform entities from [`homeassistant.components.light.LightEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/light/__init__.py).
A light entity controls the brightness, hue and saturation color value, white value, color temperature and effects of a light source. Derive platform entities from [`homeassistant.components.light.LightEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/__init__.py).
## Properties

View File

@ -3,7 +3,7 @@ title: Lock Entity
sidebar_label: Lock
---
A lock entity is able to be locked and unlocked. Locking and unlocking can optionally be secured with a user code. Some locks also allow for opening of latches, this may also be secured with a user code. Derive a platform entity from [`homeassistant.components.lock.LockEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/lock/__init__.py).
A lock entity is able to be locked and unlocked. Locking and unlocking can optionally be secured with a user code. Some locks also allow for opening of latches, this may also be secured with a user code. Derive a platform entity from [`homeassistant.components.lock.LockEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/lock/__init__.py).
## Properties

View File

@ -6,7 +6,7 @@ sidebar_label: Media Player
:::info Incomplete
This entry is incomplete. Contribution welcome.
:::
A media player entity controls a media player. Derive a platform entity from [`homeassistant.components.media_player.MediaPlayerEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/media_player/__init__.py).
A media player entity controls a media player. Derive a platform entity from [`homeassistant.components.media_player.MediaPlayerEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/media_player/__init__.py).
## Properties

View File

@ -3,7 +3,7 @@ title: Number Entity
sidebar_label: Number
---
A `number` is an entity that allows the user to input an arbitrary value to an integration. Derive entity platforms from [`homeassistant.components.number.NumberEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/number/__init__.py)
A `number` is an entity that allows the user to input an arbitrary value to an integration. Derive entity platforms from [`homeassistant.components.number.NumberEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/number/__init__.py)
## Properties

View File

@ -3,7 +3,7 @@ title: Switch Entity
sidebar_label: Switch
---
A switch entity turns on or off something, for example a relay. Derive a platform entity from [`homeassistant.components.switch.SwitchEntity`](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/switch/__init__.py).
A switch entity turns on or off something, for example a relay. Derive a platform entity from [`homeassistant.components.switch.SwitchEntity`](https://github.com/home-assistant/core/blob/dev/homeassistant/components/switch/__init__.py).
To represent something which can be turned on or off but can't be controlled, for example a wall switch which transmits its state but can't be turned on or off from Home Assistant, a Binary Sensor is a better choice.
To represent something which doesn't have a state, for example a door bell push button, a custom event or a Device Trigger is a better choice.

View File

@ -12,7 +12,7 @@ Not all existing code follows the requirements in this checklist. This cannot be
### 0. Common
1. Follow our [Style guidelines](development_guidelines.md)
2. Use existing constants from [`const.py`](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/const.py)
2. Use existing constants from [`const.py`](https://github.com/home-assistant/core/blob/dev/homeassistant/const.py)
- Only add new constants to `const.py` if they are widely used. Otherwise keep them on components level
### 1. Requirements

View File

@ -12,7 +12,7 @@ Not all existing platforms follow the requirements in this checklist. This canno
### 0. Common
1. Follow our [Style guidelines](development_guidelines.md)
2. Use existing constants from [`const.py`](https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/const.py)
2. Use existing constants from [`const.py`](https://github.com/home-assistant/core/blob/dev/homeassistant/const.py)
- Only add new constants to `const.py` if they are widely used. Otherwise keep them on platform level
- Use `CONF_MONITORED_CONDITIONS` instead of `CONF_MONITORED_VARIABLES`

View File

@ -12,7 +12,7 @@ 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](creating_platform_index.md), develop a [new integration](creating_component_index.md), 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 integration](creating_component_index.md), or fix [issues](https://github.com/home-assistant/core/issues).
3. [Test your changes](development_testing.md) and check for style violations.
Consider adding tests to ensure that your code works.

View File

@ -6,7 +6,7 @@ The `configuration.yaml` file contains the configuration options for components
We test the configuration to ensure that users have a great experience and minimize notifications if something is wrong with a platform or component setup before Home Assistant runs.
Besides [voluptuous](https://pypi.python.org/pypi/voluptuous) default types, many custom types are available. For an overview, take a look at the [config_validation.py](https://github.com/home-assistant/home-assistant/blob/master/homeassistant/helpers/config_validation.py) helper.
Besides [voluptuous](https://pypi.python.org/pypi/voluptuous) default types, many custom types are available. For an overview, take a look at the [config_validation.py](https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/config_validation.py) helper.
- Types: `string`, `byte`, and `boolean`
- Entity ID: `entity_id` and `entity_ids`

View File

@ -11,6 +11,6 @@ Whenever the user taps or clicks on one of the cards, a more info dialog will sh
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`:
1. Add `'camera'` to the array `DOMAINS_WITH_MORE_INFO` in the file [/common/const.ts](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/common/const.ts).
2. Create the files `more-info-camera.js` in the folder [/dialogs/more-info/controls](https://github.com/home-assistant/home-assistant-polymer/tree/master/src/dialogs/more-info/controls).
3. Add `import './more-info-camera.js';` to [/dialogs/more-info/controls/more-info-content.js](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/dialogs/more-info/controls/more-info-content.js)
1. Add `'camera'` to the array `DOMAINS_WITH_MORE_INFO` in the file [/common/const.ts](https://github.com/home-assistant/frontend/blob/dev/src/common/const.ts).
2. Create the files `more-info-camera.js` in the folder [/dialogs/more-info/controls](https://github.com/home-assistant/frontend/tree/dev/src/dialogs/more-info/controls).
3. Add `import './more-info-camera.js';` to [/dialogs/more-info/controls/more-info-content.js](https://github.com/home-assistant/frontend/blob/dev/src/dialogs/more-info/controls/more-info-content.js)

View File

@ -6,16 +6,16 @@ The main interface of Home Assistant is a list of the current entities and their
![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).
The different card types can be found [here](https://github.com/home-assistant/frontend/tree/dev/src/state-summary).
Sensors, when not grouped, are shown as so-called badges on top of the state cards.
![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.ts`](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/components/entity/ha-state-label-badge.ts).
The different badges are located in the file [`/src/components/entity/ha-state-label-badge.ts`](https://github.com/home-assistant/frontend/blob/dev/src/components/entity/ha-state-label-badge.ts).
Adding a custom card type can be done with a few simple steps. For this example we will add a new state card for the domain `camera`:
1. Add `'camera'` to the array `DOMAINS_WITH_CARD` in the file [/common/const.ts](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/common/const.ts).
2. Create the files `state-card-camera.js` in the folder [/state-summary/](https://github.com/home-assistant/home-assistant-polymer/tree/master/src/state-summary).
3. Add `import './state-card-camera.js';` to [state-card-content.js](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/state-summary/state-card-content.js).
1. Add `'camera'` to the array `DOMAINS_WITH_CARD` in the file [/common/const.ts](https://github.com/home-assistant/frontend/blob/dev/src/common/const.ts).
2. Create the files `state-card-camera.js` in the folder [/state-summary/](https://github.com/home-assistant/frontend/tree/dev/src/state-summary).
3. Add `import './state-card-camera.js';` to [state-card-content.js](https://github.com/home-assistant/frontend/blob/dev/src/state-summary/state-card-content.js).

View File

@ -8,6 +8,6 @@ Unlike localized strings merged in the `home-assistant` repository, custom compo
These files follow the same formatting as [backend translation string files](internationalization/core.md), but a copy will exist for each translated language.
The language codes follow the [BCP47](https://tools.ietf.org/html/bcp47) format. The [frontend translation files](https://github.com/home-assistant/home-assistant-polymer/tree/master/translations) can also be referred to if you are unsure of the correct language code to use.
The language codes follow the [BCP47](https://tools.ietf.org/html/bcp47) format. The [frontend translation files](https://github.com/home-assistant/frontend/tree/master/translations) can also be referred to if you are unsure of the correct language code to use.
To make sure that your translation files are correct, test with our integration validator Hassfest. [Set up instructions here.](https://developers.home-assistant.io/blog/2020/04/16/hassfest)

View File

@ -30,7 +30,7 @@ Placeholders shown in curly brackets `{}` are [translation arguments](https://fo
## Adding a new language
If your language is not listed you can request it at [GitHub](https://github.com/home-assistant/home-assistant-polymer/issues/new). Please provide both the English name and the native name for your language. For example:
If your language is not listed you can request it at [GitHub](https://github.com/home-assistant/frontend/issues/new). Please provide both the English name and the native name for your language. For example:
```txt
English Name: German

View File

@ -67,7 +67,7 @@ const features = [
</a>
</li>
<li>
<a href="https://github.com/home-assistant/home-assistant-polymer">
<a href="https://github.com/home-assistant/frontend">
Home Assistant Frontend
</a>
</li>