diff --git a/atom.xml b/atom.xml index dc69fcaef7..f45ce7f1fb 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
The configuration.yaml
file contains the configuration options for components and platforms. To ensure that the given configuration provided by the user is valid we use voluptuous to check it. Certain entries are optional or could be required for the setup of a platform or a component. Others must be of a definied type or out of an already defined list.
The configuration.yaml
file contains the configuration options for components and platforms. We use voluptuous to make sure that the configuration provided by the user is valid. Some entries are optional or could be required to set up a platform or a component. Others must be a defined type or from an already-defined list.
The goal of testing the configuration is to assure that users have a great experience due to notifications if something is wrong with a platform or component setup before Home Assistant is running.
+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.
-Beside the voluptuous default types are a bunch of custom types available. To get a full overview take a look at the config_validation.py helper.
+Besides voluptuous default types, many custom types are available. For an overview, take a look at the config_validation.py helper.
string
, byte
, and boolean
template
, slug
, temperature_unit
, latitude
, longitude
, isfile
, sun_event
, ensure_list
, port
, url
, and icon
To validate plaforms using MQTT there are valid_subscribe_topic
and valid_publish_topic
present.
To validate plaforms using MQTT, valid_subscribe_topic
and valid_publish_topic
are available.
Some things to keep in mind:
const.py
.PLATFORM_SCHEMA
from parent component and extend it.required
first, then optional
.const.py
PLATFORM_SCHEMA
from the parent component and extend itrequired
first and optional
secondThis section contains a couple of snippets for the validation we use.
+This section contains snippets for the validation we use.
-It’s common to set a default for a sensor if the user is not providing a name to use.
+It’s common to set a default for a sensor if the user doesn’t provide a name to use.
DEFAULT_NAME = 'Sensor name'
@@ -129,9 +129,9 @@
In certain cases you want to limit the user’s input to a couple of options.
+You might want to limit the user’s input to a couple of options.
DEFAULT_METHOD = 'GET'
@@ -141,9 +141,9 @@
As all port numbers are coming out of the range 1 till 65535.
+All port numbers are from a range of 1 to 65535.
DEFAULT_PORT = 993
@@ -153,9 +153,9 @@
If a sensor has a pre-defined list of available options it should be tested if the configuration entry matches it.
+If a sensor has a pre-defined list of available options, test to make sure the configuration entry matches the list.
SENSOR_TYPES = {
'article_cache': ('Article Cache', 'MB'),
@@ -170,7 +170,6 @@