Refactor MQTT from docs

This commit is contained in:
Otto Winter 2019-02-17 12:28:17 +01:00
parent 4928ec5de2
commit 85cfae9aec
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
94 changed files with 254 additions and 253 deletions

View File

@ -6,6 +6,19 @@ Native API Component
:image: server-network.png
:keywords: Native API, ESPHome, Home Assistant
The ESPHome native API is used to communicate with clients directly, with a highly-optimized
network protocol. Currently, only the esphome tool and Home Assistant use this native API.
After adding an ``api:`` line to your esphome configuration you can go to the Home Assistant
webinterface and navigate to the "Integrations" screen in the "Configuration" panel. Then wait
for the ESPHome device to show up under the discovered section (can take up to 5 minutes) or add
the device manually by clicking "CONFIGURE" on the ESPHome integration and entering
"<NODE_NAME>.local" as the address.
The ESPHome native API is based on a custom TCP protocol using protocol buffers. You can find
the protocol data structure definitions here: https://github.com/esphome/esphome-core/blob/dev/src/esphome/api/api.proto.
A python library that implements this protocol can be found `here <https://github.com/esphome/aioesphomeapi>`__.
.. code-block:: yaml
# Example configuration entry
@ -105,12 +118,6 @@ You can repeat these steps for all your nodes, or convert them over to the new n
9. Now you can remove ``mqtt:`` from your ESPHome configuration. You don't have to, but doing so will
free up resources (of which these ESPs don't have too much).
.. warning::
Using MQTT together with the native API seems to be broken on some devices at the moment.
Of course in the future you will be able to use both at the same time, but the fix will
just take a while to get done as it's a larger scale issue.
.. _api-homeassistant_service_action:
``homeassistant.service`` Action

View File

@ -62,7 +62,7 @@ Configuration variables:
- **binary_sensors** (**Required**, list): A list of binary sensors to initialize. The length here
must equal the number of items in the ``return`` statement of the ``lambda``.
- All options from :ref:`Binary Sensor <config-binary_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All options from :ref:`Binary Sensor <config-binary_sensor>`.
See :cpp:class:`binary_sensor::BinarySensor`

View File

@ -31,8 +31,7 @@ Configuration variables:
- **name** (**Required**, string): The name of the binary sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify
the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`
and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
.. _esp32_ble_tracker-setting_up_devices:

View File

@ -39,8 +39,7 @@ Configuration variables:
- **id** (*Optional*,
:ref:`config-id`): Manually specify
the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`
and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
Touch Pad Pins
--------------

View File

@ -27,8 +27,7 @@ Configuration variables:
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin to periodically check.
- **name** (**Required**, string): The name of the binary sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`
and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
Activating internal pullups
---------------------------

View File

@ -50,7 +50,13 @@ Automations:
- **on_multi_click** (*Optional*, :ref:`Automation <automation>`): An automation to perform
when the button is pressed in a specific sequence.
See :ref:`binary_sensor-on_multi_click`.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
Advanced options:
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
.. _binary_sensor-filters:

View File

@ -31,7 +31,7 @@ Configuration variables:
- **page_id** (**Required**, int): The ID of the page the component is on. Use ``0`` for the default page.
- **component_id** (**Required**, int): The ID (the number, not name!) of the component to track.
- **nextion_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the Nextion display.
- All other options from :ref:`Binary Sensor <config-binary_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
See Also
--------

View File

@ -38,7 +38,7 @@ Configuration variables:
of hexadecimal values. For example ``74-10-37-94``.
- **name** (**Required**, string): The name of the binary sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
.. _pn532-setting_up_tags:

View File

@ -34,7 +34,7 @@ Configuration variables:
- **uid** (**Required**, integer): The unique ID of the NFC/RFID tag.
- **name** (**Required**, string): The name of the binary sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
.. _rdm6300-setting_up_tags:

View File

@ -33,8 +33,7 @@ Configuration variables:
- **remote_receiver_id** (*Optional*, :ref:`config-id`): The id of the :doc:`/components/remote_receiver`.
Defaults to the first hub in your configuration.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`
and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
.. note::

View File

@ -5,9 +5,8 @@ Status Binary Sensor
:description: Instructions for setting up MQTT status binary sensors.
:image: server-network.png
The Status Binary Sensor exposes the node state (if its connected to
MQTT or not) for Home Assistant. It uses the :ref:`MQTT birth and last will messages <mqtt-last_will_birth>`
to do this.
The Status Binary Sensor exposes the node state (if its connected to via MQTT/native API)
for Home Assistant.
.. figure:: images/status-ui.png
:align: center
@ -25,8 +24,7 @@ Configuration variables:
- **name** (**Required**, string): The name of the binary sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`
and :ref:`MQTT Component <config-mqtt-component>`. (Inverted mode is not supported)
- All other options from :ref:`Binary Sensor <config-binary_sensor>`. (Inverted mode is not supported)
See Also
--------

View File

@ -41,8 +41,7 @@ Configuration variables:
- **id** (*Optional*,
:ref:`config-id`): Manually specify
the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`
and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
.. _binary_sensor-template-publish_action:

View File

@ -58,8 +58,13 @@ Configuration variables:
This will make the Home Assistant frontend show buttons for both OPEN and CLOSE actions, instead
of hiding one of them. Defaults to ``false``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
Advanced options:
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
.. _cover-template-publish_action:

View File

@ -52,19 +52,6 @@ Advanced features:
- **mode** (*Optional*): The mode to use for the wakeup source. Must be one of ``ALL_LOW`` (wake up when
all pins go LOW) or ``ANY_HIGH`` (wake up when any pin goes HIGH).
.. note::
The :ref:`availability feature <mqtt-last_will_birth>` of the MQTT client will cause all values
from the node to be displayed as "unavailable" while the node is in deep sleep mode. To disable availability
reporting and not have any "unavailable" values, set ``birth_message`` and ``will_message`` to empty values:
.. code-block:: yaml
mqtt:
# ...
birth_message:
will_message:
.. _deep_sleep-esp32_wakeup_pin_mode:
ESP32 Wakeup Pin Mode

View File

@ -29,8 +29,7 @@ Configuration variables:
:ref:`output <output>` to use for the oscillation state of this fan. Default is empty.
- **id** (*Optional*, :ref:`config-id`): Manually specify
the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`
and :ref:`Fan Component <config-fan>`.
- All other options from :ref:`Fan Component <config-fan>`.
See Also
--------

View File

@ -28,6 +28,12 @@ Base Fan Configuration
Configuration variables:
- **name** (**Required**, string): The name of the fan.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
MQTT options:
- **oscillation_state_topic** (*Optional*, string): The topic to
publish fan oscillation state changes to.
- **oscillation_command_topic** (*Optional*, string): The topic to

View File

@ -38,8 +38,7 @@ Configuration variables:
setting. Must be in range 0 to 1. Defaults to 1.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`
and :ref:`Fan Component <config-fan>`.
- All other options from :ref:`Fan Component <config-fan>`.
See Also
--------

View File

@ -29,7 +29,11 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light, though binary lights
only support very few of them.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------

View File

@ -26,9 +26,9 @@ Configuration variables:
- **name** (**Required**, string): The name of the light.
- **cold_white** (**Required**, :ref:`config-id`): The id of the float :ref:`output` to use for the cold white channel.
- **warm_white** (**Required**, :ref:`config-id`): The id of the float :ref:`output` to use for the warm white channel.
- **cold_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__)
- **cold_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__ or Kelvin)
of the cold white channel.
- **warm_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__)
- **warm_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__ or Kelvin)
of the warm white channel.
- **gamma_correct** (*Optional*, float): The `gamma correction
factor <https://en.wikipedia.org/wiki/Gamma_correction>`__ for the light. Defaults to ``2.8``.
@ -36,14 +36,12 @@ Configuration variables:
the transition if no transition parameter is provided by Home Assistant. Defaults to ``1s``.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
.. note::
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
The CWWW light platform only works with ``float`` :ref:`outputs <output>` that
can output any light intensity percentage like the :doc:`ESP32 LEDC </components/output/ledc>` or
:doc:`ESP8266 PWM </components/output/esp8266_pwm>` components and does **not** work with output
platforms like the :doc:`/components/output/gpio`.
See Also
--------

View File

@ -53,7 +53,11 @@ Configuration variables:
this light. When the light is turned on, the power supply will automatically be switched on too.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
.. _fastled_clockless-chipsets:

View File

@ -53,7 +53,11 @@ Configuration variables:
this light. When the light is turned on, the power supply will automatically be switched on too.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
.. _fastled_spi-chipsets:

View File

@ -43,8 +43,12 @@ Configuration variables:
the transition if no transition parameter is provided by Home
Assistant. Defaults to ``1s``.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------

View File

@ -42,7 +42,6 @@ Configuration variables:
- **power_supply** (*Optional*, :ref:`config-id`): The :doc:`/components/power_supply` to connect to
this light. When the light is turned on, the power supply will automatically be switched on too.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
**Type Options:**
@ -84,6 +83,13 @@ If you have one line, only specify ``pin``, otherwise specify both ``clock_pin``
- **clock_pin** (**Required**, :ref:`config-pin`): The pin for the clock line of the light, for two-pin lights.
- **data_pin** (**Required**, :ref:`config-pin`): The pin for the data line of the light, for two-pin lights.
**Advanced Options:**
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------

View File

@ -45,7 +45,11 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
.. note::

View File

@ -48,7 +48,10 @@ Configuration variables:
the transition if no transition parameter is provided by Home Assistant. Defaults to ``1s``.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------

View File

@ -32,14 +32,10 @@ Configuration variables:
the transition if no transition parameter is provided by Home Assistant. Defaults to ``1s``.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
.. note::
The RGBW light platform only works with ``float`` :ref:`outputs <output>` that
can output any light intensity percentage like the :doc:`ESP32 LEDC </components/output/ledc>` or
:doc:`ESP8266 PWM </components/output/esp8266_pwm>` components and does **not** work with output
platforms like the :doc:`/components/output/gpio`.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------

View File

@ -32,9 +32,9 @@ Configuration variables:
- **blue** (**Required**, :ref:`config-id`): The id of the float :ref:`output` to use for the blue channel.
- **cold_white** (**Required**, :ref:`config-id`): The id of the float :ref:`output` to use for the cold white channel.
- **warm_white** (**Required**, :ref:`config-id`): The id of the float :ref:`output` to use for the warm white channel.
- **cold_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__)
- **cold_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__ or Kelvin)
of the cold white channel.
- **warm_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__)
- **warm_white_color_temperature** (**Required**, float): The color temperate (in `mireds <https://en.wikipedia.org/wiki/Mired>`__ or Kelvin)
of the warm white channel.
- **gamma_correct** (*Optional*, float): The `gamma correction
factor <https://en.wikipedia.org/wiki/Gamma_correction>`__ for the light. Defaults to ``2.8``.
@ -42,14 +42,10 @@ Configuration variables:
the transition if no transition parameter is provided by Home Assistant. Defaults to ``1s``.
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
.. note::
The RGBWW light platform only works with ``float`` :ref:`outputs <output>` that
can output any light intensity percentage like the :doc:`ESP32 LEDC </components/output/ledc>` or
:doc:`ESP8266 PWM </components/output/esp8266_pwm>` components and does **not** work with output
platforms like the :doc:`/components/output/gpio`.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
See Also
--------

View File

@ -267,9 +267,6 @@ Configuration variables:
- **command_topic** (*Optional*, string): The topic to subscribe to for
commands from the remote. Defaults to
``<TOPIC_PREFIX>/<COMPONENT_TYPE>/<COMPONENT_NAME>/command``.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not send any MQTT messages and can be used for :ref:`on-device automations <automation>`. Only
specifying an ``id`` without a ``name`` will implicitly set this to true.
.. warning::

View File

@ -22,24 +22,6 @@ To use the channels of this components, you first need to setup the
global ``my9231`` hub and give it an id, and then define the
:doc:`individual output channels </components/output/my9231>`.
.. note::
One of the features of the MY9231/MY9291 driver is that the chips
remember their state after a power cycling. Unfortunately, the
state of the driver can not be read. Therefore, if ESPHome can
not restore the previous state, it will result in a mismatch of
the driver output and the internal state (= MQTT state). So you
can configure the behaviour on boot time:
``update_on_boot: True``
On device power up/boot, the light may flash shortly, to the
state before powering off.
``update_on_boot: False``
On device power up/boot, the light show the last state, but the
internal data will not reflect this state. Thus, the first fade
is wrong, as well as the MQTT state.
.. code-block:: yaml
# Example configuration entry
@ -94,10 +76,7 @@ complete configuration for a Sonoff B1 looks like:
ssid: <YOUR_SSID>
password: <YOUR_WIFI_PASSPHRASE>
mqtt:
broker: <YOUR_MQTT_BROKER>
username: <YOUR_MQTT_USERNAME>
password: <YOUR_MQTT_PASSWORD>
api:
logger:
@ -138,6 +117,24 @@ complete configuration for a Sonoff B1 looks like:
cold_white_color_temperature: 6500 K
warm_white_color_temperature: 2800 K
.. note::
One of the features of the MY9231/MY9291 driver is that the chips
remember their state after a power cycling. Unfortunately, the
state of the driver can not be read. Therefore, if ESPHome can
not restore the previous state, it will result in a mismatch of
the driver output and the internal state (= MQTT state). So you
can configure the behaviour on boot time:
``update_on_boot: True``
On device power up/boot, the light may flash shortly, to the
state before powering off.
``update_on_boot: False``
On device power up/boot, the light show the last state, but the
internal data will not reflect this state. Thus, the first fade
is wrong, as well as the MQTT state.
See Also
--------

View File

@ -34,7 +34,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval
to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
.. note::

View File

@ -61,7 +61,7 @@ Sensor Configuration:
- **PROXIMITY**
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Binary Sensor Configuration:
@ -74,7 +74,7 @@ Binary Sensor Configuration:
- **RIGHT**
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
See Also
--------

View File

@ -46,7 +46,7 @@ Configuration variables:
sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code
generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -28,7 +28,7 @@ Configuration variables:
sensor.
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -45,7 +45,7 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bme280-oversampling>`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **pressure** (**Required**): The information for the pressure sensor.
@ -53,7 +53,7 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bme280-oversampling>`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The information for the pressure sensor.
@ -61,7 +61,7 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bme280-oversampling>`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **address** (*Optional*, int): Manually specify the i^2c address of
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -45,7 +45,7 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`bme680-oversampling`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **pressure** (**Required**): The information for the pressure sensor.
@ -53,7 +53,7 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`bme680-oversampling`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The information for the pressure sensor.
@ -61,13 +61,13 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`bme680-oversampling`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **gas_resistance** (**Required**): The information for the gas sensor.
- **name** (**Required**, string): The name for the gas resistance sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **address** (*Optional*, int): Manually specify the i^2c address of
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -43,13 +43,13 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature
sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **pressure** (**Required**): The information for the pressure sensor.
- **name** (**Required**, string): The name for the pressure sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x77``.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -43,7 +43,7 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bmp280-oversampling>`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **pressure** (**Required**): The information for the pressure sensor.
@ -51,7 +51,7 @@ Configuration variables:
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bmp280-oversampling>`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **address** (*Optional*, int): Manually specify the i^2c address of
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -42,11 +42,11 @@ Configuration variables:
------------------------
- **current** (*Optional*): Use the current value of the sensor in amperes. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): Use the (active) power value of the sensor in watts. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **voltage** (*Optional*): Use the voltage value of the sensor in V (RMS).
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want

View File

@ -365,7 +365,7 @@ Configuration variables:
- **sensors** (**Required**, list): A list of sensors to initialize. The length here
must equal the number of items in the ``return`` statement of the ``lambda``.
- All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -51,7 +51,7 @@ Configuration variables:
- **dallas_id** (*Optional*, :ref:`config-id`): The ID of the :doc:`dallas hub </components/dallas>`.
Use this if you have multiple dallas hubs.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
.. _dallas-getting-ids:

View File

@ -55,13 +55,13 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The information for the humidity sensor
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **model** (*Optional*, int): Manually specify the DHT model, can be
one of ``AUTO_DETECT``, ``DHT11``, ``DHT22``, ``AM2302``, ``RHT03``, ``SI7021``

View File

@ -40,13 +40,13 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The information for the humidity sensor
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

View File

@ -31,7 +31,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -34,7 +34,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval
to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
.. warning::

View File

@ -43,13 +43,13 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The information for the humidity sensor
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

View File

@ -44,11 +44,11 @@ Configuration variables:
- **cf_pin** (**Required**, :ref:`config-pin`): The pin CF is connected to.
- **cf1_pin** (**Required**, :ref:`config-pin`): The pin CF1 is connected to.
- **current** (*Optional*): Use the current value of the sensor in amperes. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): Use the (active) power value of the sensor in watts. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **voltage** (*Optional*): Use the voltage value of the sensor in V (RMS).
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **current_resistor** (*Optional*, float): The value of the shunt resistor for current measurement.
Defaults to the Sonoff POW's value ``0.001 ohm``.
- **voltage_divider** (*Optional*, float): The value of the voltage divider on the board as ``(R_upstream + R_downstream) / R_downstream``.

View File

@ -36,13 +36,13 @@ Configuration variables:
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x1E``.
- **field_strength_x** (*Optional*): The field strength in microtesla along the X-Axis. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **field_strength_y** (*Optional*): The field strength in microtesla along the Y-Axis. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **field_strength_z** (*Optional*): The field strength in microtesla along the Z-Axis. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **heading** (*Optional*): The heading of the sensor in degrees. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.

View File

@ -30,7 +30,7 @@ Configuration variables:
- **name** (**Required**, string): The name of the sensor.
- **entity_id** (**Required**, string): The entity ID to import from Home Assistant.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -46,13 +46,13 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The information for the humidity sensor.
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

View File

@ -42,7 +42,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Converting Units

View File

@ -55,13 +55,13 @@ Configuration variables:
- **max_current** (*Optional*, float): The maximum current you are expecting. ESPHome will use this to
configure the sensor optimally. Defaults to ``3.2A``.
- **current** (*Optional*): Use the current value of the sensor in amperes. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): Use the power value of the sensor in watts. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **bus_voltage** (*Optional*): Use the bus voltage (voltage of the high side contact) value of the sensor in V.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **shunt_voltage** (*Optional*): Use the shunt voltage (voltage across the shunt resistor) value of the sensor in V.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

View File

@ -56,13 +56,13 @@ Configuration variables:
- **shunt_resistance** (*Optional*, float): The value of the shunt resistor on this channel for current calculation.
Defaults to ``0.1 ohm``.
- **current** (*Optional*): Use the current value on this channel in amperes. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): Use the power value on this channel in watts. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **bus_voltage** (*Optional*): Use the bus voltage (voltage of the high side contact) value on this channel in V.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **shunt_voltage** (*Optional*): Use the shunt voltage (voltage across the shunt resistor) value on this channel in V.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **channel_2** (*Optional*): The configuration options for the 2nd channel. Same options as 1st channel.
- **channel_3** (*Optional*): The configuration options for the 3rd channel. Same options as 1st channel.

View File

@ -42,11 +42,12 @@ Configuration variables:
not actually do any maths (conversion between units).
- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend.
- **accuracy_decimals** (*Optional*, int): Manually set the accuracy of decimals to use when reporting values.
- **expire_after** (*Optional*, :ref:`config-time`): Manually set the time in which
the sensor values should be marked as “expired”/“unknown”. Not providing any value means no expiry.
- **filters** (*Optional*): Specify filters to use for some basic
transforming of values. Defaults to a basic sliding window moving
average over the last few values. See :ref:`Sensor Filters <sensor-filters>` for more information.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
Automations:
@ -56,8 +57,12 @@ Automations:
when a published value transition from outside to a range to inside. See :ref:`sensor-on_value_range`.
- **on_raw_value** (*Optional*, :ref:`Automation <automation>`): An automation to perform
when a raw value is received that hasn't passed through any filters. See :ref:`sensor-on_raw_value`.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
MQTT Options:
- **expire_after** (*Optional*, :ref:`config-time`): Manually set the time in which
the sensor values should be marked as “expired”/“unknown”. Not providing any value means no expiry.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
.. note::

View File

@ -41,7 +41,7 @@ Configuration variables:
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -49,7 +49,7 @@ Configuration variables:
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -46,14 +46,14 @@ Configuration variables:
- **name** (**Required**, string): The name for the CO_2 sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (**Required**): The information for the temperature sensor. Please note that this is
not officially documented in the datasheet and seems to be quite inaccurate.
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.

View File

@ -55,19 +55,19 @@ Configuration variables:
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x68``.
- **accel_x** (*Optional*): Use the X-Axis of the Accelerometer. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **accel_y** (*Optional*): Use the Y-Axis of the Accelerometer. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **accel_z** (*Optional*): Use the Z-Axis of the Accelerometer. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **gyro_x** (*Optional*): Use the X-Axis of the Gyroscope. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **gyro_y** (*Optional*): Use the Y-Axis of the Gyroscope. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **gyro_z** (*Optional*): Use the Z-Axis of the Gyroscope. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **temperature** (*Optional*): Use the internal temperature of the sensor. All options from
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
:ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.

View File

@ -30,7 +30,7 @@ Configuration variables:
- **topic** (**Required**, string): The MQTT topic to listen for numeric messages.
- **qos** (*Optional*, int): The MQTT QoS to subscribe with. Defaults to ``0``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -42,7 +42,7 @@ Configuration variables:
- **name** (**Required**, string): The name for the pressure sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (**Required**): The information for the temperature.
sensor
@ -50,7 +50,7 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature
sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **address** (*Optional*, int): Manually specify the i^2c address of
the sensor. Defaults to ``0x77``.

View File

@ -46,17 +46,17 @@ Configuration variables:
------------------------
- **pm_1_0** (*Optional*): Use the concentration of particulates of size less than 1.0µm in µg per cubic meter.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **pm_2_5** (*Optional*): Use the concentration of particulates of size less than 2.5µm in µg per cubic meter.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **pm_10_0** (*Optional*): Use the concentration of particulates of size less than 10.0µm in µg per cubic meter.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **temperature** (*Optional*): Use the temperature value in °C for the ``PMS5003T`` and ``PMS5003ST``.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **humidity** (*Optional*): Use the humidity value in % for the ``PMS5003T`` and ``PMS5003ST``.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **formaldehyde** (*Optional*): Use the formaldehyde (HCHO) concentration in µg per cubic meter for the ``PMS5003ST``.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.

View File

@ -47,7 +47,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Converting units
----------------

View File

@ -48,7 +48,7 @@ Configuration variables:
An optional pin that resets the step value. This is useful with rotary encoders that have have a
third pin. Defaults to no reset pin.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Debouncing Output
-----------------

View File

@ -36,13 +36,13 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The information for the humidity sensor.
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor.
Defaults to ``0x44``.

View File

@ -49,17 +49,17 @@ Configuration variables:
------------------------
- **red_channel** (*Optional*): Get the percentage of how strongly the red color channel is activated.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **green_channel** (*Optional*): Get the percentage of how strongly the green color channel is activated.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **blue_channel** (*Optional*): Get the percentage of how strongly the blue color channel is activated.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **clear_channel** (*Optional*): Get the percentage of how strongly the clear (without a color filter)
channel is activated. All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
channel is activated. All options from :ref:`Sensor <config-sensor>`.
- **illuminance** (*Optional*): Get the total illuminance of the sensor in lx.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **color_temperature** (*Optional*): Get the calculated color temperature of the light in Kelvin.
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
All options from :ref:`Sensor <config-sensor>`.
- **gain** (*Optional*): Set the gain for the internal ADCs to work better in certain low-light conditions. Valid
values are ``1x`` (default), ``4x``, ``16x``, ``60x`` (highest gain).
- **integration_time** (*Optional*): The amount of time the light sensor is exposed. Valid values are

View File

@ -38,7 +38,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
.. _sensor-template-publish_action:

View File

@ -38,7 +38,7 @@ Configuration variables:
to integrate over time.
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Converting from W to kW
-----------------------

View File

@ -49,7 +49,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -57,7 +57,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Ultrasonic Timeouts
-------------------

View File

@ -21,7 +21,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -30,7 +30,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval
to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
.. warning::

View File

@ -39,31 +39,31 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **moisture** (*Optional*): The information for the moisture sensor
- **name** (**Required**, string): The name for the moisture sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **illuminance** (*Optional*): The information for the illuminance sensor
- **name** (**Required**, string): The name for the illuminance sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **conductivity** (*Optional*): The information for the soil conductivity sensor
- **name** (**Required**, string): The name for the soil conductivity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **battery_level** (*Optional*): The information for the battery level sensor
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Setting Up Devices

View File

@ -45,19 +45,19 @@ Configuration variables:
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (*Optional*): The information for the humidity sensor
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **battery_level** (*Optional*): The information for the battery level sensor
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Sensor <config-sensor>`.
Setting Up Devices

View File

@ -60,7 +60,7 @@ Configuration variables:
- **switches** (**Required**, list): A list of switches to initialize. The length here
must equal the number of items in the ``return`` statement of the ``lambda``.
- All options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All options from :ref:`Switch <config-switch>`.
See :cpp:class:`switch_::Switch`

View File

@ -38,7 +38,7 @@ Configuration variables:
- **interlock** (*Optional*, list): A list of other GPIO switches in an interlock group. See
:ref:`switch-gpio-interlocking`.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Switch <config-switch>`.
Active Low Switch
-----------------

View File

@ -22,13 +22,16 @@ Base Switch Configuration
Configuration variables:
- **name** (**Required**, string): The name of the switch.
- **icon** (*Optional*, icon): Manually set the icon to use for the
sensor in the frontend.
- **inverted** (*Optional*, boolean): Whether to invert the binary
state, i.e. report ON states as OFF and vice versa. Defaults
to ``False``.
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
- **name** (**Required**, string): The name of the switch.
- **icon** (*Optional*, icon): Manually set the icon to use for the
sensor in the frontend.
- **inverted** (*Optional*, boolean): Whether to invert the binary
state, i.e. report ON states as OFF and vice versa. Defaults
to ``False``.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, All other options from :ref:`MQTT Component <config-mqtt-component>`.
.. _switch-toggle_action:

View File

@ -29,7 +29,7 @@ Configuration variables:
- **output** (**Required**, :ref:`config-id`): The ID of the output component to use.
- **name** (**Required**, string): The name for the switch.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Switch <config-switch>`.
See Also
--------

View File

@ -46,7 +46,7 @@ Configuration variables:
- **remote_transmitter_id** (*Optional*, :ref:`config-id`): The id of the :doc:`/components/remote_transmitter`.
Defaults to the first hub specified.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Switch <config-switch>`.
.. note::

View File

@ -24,7 +24,7 @@ Configuration variables:
- **name** (**Required**, string): The name for the switch.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Switch <config-switch>`.
See Also
--------

View File

@ -26,7 +26,7 @@ Configuration variables:
- **name** (**Required**, string): The name for the switch.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Switch <config-switch>`.
See Also
--------

View File

@ -52,7 +52,7 @@ Configuration variables:
This will make the Home Assistant frontend show buttons for both ON and OFF actions, instead
of hiding one of them when the switch is ON/OFF. Defaults to ``false``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Switch <config-switch>`.
.. _switch-template-publish_action:

View File

@ -31,7 +31,7 @@ Configuration variables:
- **name** (**Required**, string): The name for the switch.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the UART hub.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Switch <config-switch>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Switch <config-switch>`.
See Also
--------

View File

@ -59,7 +59,7 @@ Configuration variables:
- **text_sensors** (**Required**, list): A list of text sensors to initialize. The length here
must equal the number of items in the ``return`` statement of the ``lambda``.
- All options from :ref:`Text Sensor <config-text_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All options from :ref:`Text Sensor <config-text_sensor>`.
See :cpp:class:`text_sensor::TextSensor`

View File

@ -22,7 +22,7 @@ Configuration variables:
- **name** (**Required**, string): The name of the text sensor.
- **entity_id** (**Required**, string): The entity ID to import from Home Assistant.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Text Sensor <config-text_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Text Sensor <config-text_sensor>`.
See Also
--------

View File

@ -26,6 +26,10 @@ Configuration variables:
- **name** (**Required**, string): The name for the sensor.
- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- If MQTT enabled, All other options from :ref:`MQTT Component <config-mqtt-component>`.
Automations:

View File

@ -26,7 +26,7 @@ Configuration variables:
- **topic** (**Required**, string): The MQTT topic to listen for numeric messages.
- **qos** (*Optional*, int): The MQTT QoS to subscribe with. Defaults to ``0``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Text Sensor <config-text_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Text Sensor <config-text_sensor>`.
Example Usage for Displays
--------------------------

View File

@ -34,7 +34,7 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
text sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Text Sensor <config-text_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Text Sensor <config-text_sensor>`.
.. _text_sensor-template-publish_action:

View File

@ -24,7 +24,7 @@ Configuration variables:
- **name** (**Required**, string): The name of the text sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Text Sensor <config-text_sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
- All other options from :ref:`Text Sensor <config-text_sensor>`.
See Also
--------

View File

@ -27,10 +27,7 @@ configuration file 😀
ssid: <SSID>
password: <PASSWORD>
mqtt:
broker: <MQTT_BROKER>
username: <USER>
password: <PASSWORD>
api:
# Enable logging
logger:

View File

@ -18,7 +18,7 @@ of the end-stop switch in the motor failing this will reduce the risk for damage
Of the four main components (button sensor, 2 relays switches and the cover), only the cover will be
visible to the end-user. The other three are hidden by means of not including a ``name``. This is to
prevent accidentally switching on both relays simultaneously from MQTT/Home-assistant as that might be harmful
prevent accidentally switching on both relays simultaneously from Home Assistant as that might be harmful
for some motors.
.. note::
@ -39,10 +39,7 @@ for some motors.
ssid: '***'
password: '***'
mqtt:
broker: 'mqtt'
username: ''
password: ''
api:
logger:

View File

@ -132,10 +132,7 @@ or alternatively, you can just take the below configuration file and modify it t
ssid: <YOUR_SSID>
password: <YOUR_PASSWORD>
mqtt:
broker: <YOUR_MQTT_BROKER>
username: <YOUR_USERNAME>
password: <YOUR_PASSWORD>
api:
logger:
@ -230,10 +227,7 @@ of the basic functions.
ssid: <YOUR_SSID>
password: <YOUR_PASSWORD>
mqtt:
broker: <YOUR_MQTT_BROKER>
username: <YOUR_USERNAME>
password: <YOUR_PASSWORD>
api:
logger:
@ -303,11 +297,6 @@ into a :doc:`monochromatic light </components/light/monochromatic>`.
If you additionally want the buttons to control the relays, look at `the complete Sonoff 4CH
with automation example <https://github.com/OttoWinter/esphomedocs/blob/current/devices/sonoff_4ch.yaml>`__.
Upload the firmware again (through OTA or Serial) and you should immediately see
something like this in Home Assistant because of esphome's automatic MQTT discovery. (You'll
of course have to add them to groups if you have a ``default_view`` set):
.. figure:: images/sonoff_4ch_result.png
:align: center
:width: 75.0%

View File

@ -7,10 +7,7 @@ wifi:
ssid: <YOUR_SSID>
password: <YOUR_PASSWORD>
mqtt:
broker: <YOUR_MQTT_BROKER>
username: <YOUR_USERNAME>
password: <YOUR_PASSWORD>
api:
logger:

View File

@ -60,10 +60,7 @@ exposes all of the basic functions.
ssid: <YOUR_SSID>
password: <YOUR_PASSWORD>
mqtt:
broker: <YOUR_MQTT_BROKER>
username: <YOUR_USERNAME>
password: <YOUR_PASSWORD>
api:
logger:

View File

@ -7,10 +7,7 @@ wifi:
ssid: <YOUR_SSID>
password: <YOUR_PASSWORD>
mqtt:
broker: <YOUR_MQTT_BROKER>
username: <YOUR_USERNAME>
password: <YOUR_PASSWORD>
api:
logger:

View File

@ -63,7 +63,7 @@ there are three basic actions you can perform:
is still not found, try changing the USB cable and restarting the add-on.
- **SHOW LOGS**: With this command you can view all the logs the node is outputting. If a USB device is
connected, it will attempt to use the serial connection. Otherwise it will use the built-in MQTT logs.
connected, it will attempt to use the serial connection. Otherwise it will use the built-in OTA logs.
- **COMPILE**: This command compiles the firmware and gives you the option of downloading the generated
binary so that you can upload it yourself from your computer.