Merge branch 'current' into next

This commit is contained in:
Jesse Hills 2022-11-16 12:30:35 +13:00
commit 72c0c15dae
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
5 changed files with 45 additions and 18 deletions

View File

@ -52,7 +52,6 @@ Configuration variables:
- **heading** (*Optional*): The heading of the sensor in degrees. All options from
:ref:`Sensor <config-sensor>`.
- **oversampling** (*Optional*): The oversampling parameter for the sensor.
- **range** (*Optional*): The range parameter for the sensor.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **oversampling** (*Optional*): Number of readings to average over for each sample. One of ``1x``, ``2x``,
``4x``, ``8x``. Defaults to ``1x``.

View File

@ -16,7 +16,7 @@ states from your Home Assistant instance using the :doc:`native API </components
name: "Temperature Sensor From Home Assistant"
entity_id: sensor.temperature_sensor
With Home Assistant 2021.6 or newer, entity state attributes can also be imported.
Entity state attributes can also be imported:
.. code-block:: yaml
@ -32,7 +32,7 @@ With Home Assistant 2021.6 or newer, entity state attributes can also be importe
This component is only for numeral states. If you want to import arbitrary text states
from Home Assistant, use the :doc:`Home Assistant Text Sensor </components/text_sensor/homeassistant>`.
Albeit you might not plan to __export__ states from the node and you do not need an entity of the node
Albeit you might not plan to *export* states from the node and you do not need an entity of the node
in Home Assistant, this component still requires you to register the node under Home Assistant. See:
:doc:`Getting started with Home Assistant </guides/getting_started_hassio>`
@ -47,6 +47,15 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
.. note::
The sensors implemented by this component are by default ``internal``, to avoid exporting back them to
Home Assistant. Should you still want to do that (eg. because you use ESPHome's very efficient filters
on them) you need to specifically configure ``internal: false``. Also, ``state_class``, ``unit_of_measurement``
are not inherited from the imported sensor so you need to set them manually.
See Also
--------

View File

@ -143,8 +143,12 @@ You must set the ``address`` of the ``modbus_controller`` to the current address
modbus_controller:
- id: pzem
## the current device addr
# The current device address.
address: 0x1
# The special address 0xF8 is a broadcast address accepted by any pzem device,
# so if you use this address, make sure there is only one pzem device connected
# to the uart bus.
# address: 0xF8
modbus_id: mod_bus_pzem
command_throttle: 0ms
setup_priority: -10

View File

@ -19,16 +19,24 @@ The ``sm300d2`` sensor platform allows you to use the SM300D2 7-in-1 Air Quality
:width: 50.0%
The SM300D2 sensor supports connections via UART or RS485. This platform only supports UART-connections.
Although the SM300D2 sensor supports connections via UART or RS485, this platform only supports UART
connections. The LCD module which is often sold with/for these sensor boards can work over either UART
or RS485, so you can use the LCD over RS485 and an ESP over UART at the same time (see
:ref:`note below <pins-note>` regarding powering everything).
Make sure you have a :ref:`UART bus <uart>` in your configuration with the ``rx_pin`` connected to the
TX pin of the sensor. The sensor does not support receiving data, so the ``tx_pin`` does not need to be
connected. The sensor expects the baud rate to be set at 9600.
sensor's TX pin. The sensor does not support receiving data, so the ``tx_pin`` does not need to be
connected. The UART bus should be set to a baud rate of 9600 to match the sensor's output. Setting the
``rx_pin``'s mode to ``INPUT_PULLDOWN`` may help improve reliability if you're regularly getting missed
or bad/incomplete readings.
.. code-block:: yaml
# Example configuration entry
uart:
rx_pin: D0
rx_pin:
number: D0
mode: INPUT_PULLDOWN
tx_pin: D1
baud_rate: 9600
@ -54,43 +62,43 @@ Configuration variables:
------------------------
- **co2** (**Required**): The CO₂ data from the sensor in parts per million (ppm).
- **co2** (**Required**): The information for the CO₂ sensor. Readings in parts per million (ppm).
- **name** (**Required**, string): The name of the CO₂ sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **formaldehyde** (**Required**): The formaldehyde data of the sensor in micrograms per cubic meter air (µg/m³).
- **formaldehyde** (**Required**): The information for the formaldehyde sensor. Readings in µg/m³.
- **name** (**Required**, string): The name of the formaldehyde sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **tvoc** (**Required**): The total volatile organic compounds (TVOC) data of the sensor in micrograms per cubic meter air (µg/m³).
- **tvoc** (**Required**): The information for the total volatile organic compounds (TVOC) sensor. Readings in µg/m³.
- **name** (**Required**, string): The name of the TVOC sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **pm_2_5** (**Required**): The PM2.5 data of the sensor in micrograms per cubic meter air (µg/m³).
- **pm_2_5** (**Required**): The information for the **Weight Concentration** sensor for fine particles up to 2.5μm. Readings in µg/m³.
- **name** (**Required**, string): The name of the PM2.5 sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **pm_10_0** (**Required**): The PM10 data of the sensor in micrograms per cubic meter air (µg/m³).
- **pm_10_0** (**Required**): The information for the **Weight Concentration** sensor for coarse particles up to 10μm. Readings in µg/m³.
- **name** (**Required**, string): The name of the PM10 sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (**Required**): The temperature data of the sensor in degrees celsius (°C).
- **temperature** (**Required**): The information for the temperature sensor. Readings in degrees celsius (°C).
- **name** (**Required**, string): The name of 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>`.
- **humidity** (**Required**): The humidity data of the sensor in percent relative humidity (%).
- **humidity** (**Required**): The information for the relative humidity sensor. Readings in %.
- **name** (**Required**, string): The name of the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
@ -110,10 +118,18 @@ Configuration variables:
Pins on the SM300D2. UART RX is not in use.
.. _pins-note:
.. note::
``5V`` should be connected to power supply (supported voltage is 4.8 V to 5.2 V), ``GD`` to ``GND`` pin
The board's ``GD`` pin must be connected to a ``GND`` pin on the ESP.
The sensor board requires between 4.8 and 5.2 volts via the ``5V`` pin in either the UART or RS485 socket, as they
are connected. If you're using a USB-powered ESP module with a 5V input pin (i.e. ``VIN``) exposed, you can choose
to connect the UART ``5V`` pin to the ESP's ``VIN`` and then power everything through either the LCD module or the
ESP module, with a single power cable. If you choose to power the ESP separately from the sensor board, leave the
UART ``5V`` pin unconnected.
See Also
--------

View File

@ -16,7 +16,7 @@ states from your Home Assistant instance using the :doc:`native API </components
name: "Weather Forecast From Home Assistant"
entity_id: sensor.weather_forecast
With Home Assistant 2021.6 or newer, entity state attributes can also be imported.
Entity state attributes can also be imported:
.. code-block:: yaml
@ -34,7 +34,6 @@ Configuration variables:
- **entity_id** (**Required**, string): The entity ID to import from Home Assistant.
- **attribute** (*Optional*, string): The name of the state attribute to import from the
specified entity. The entity state is used when this option is omitted.
Requires Home Assistant 2021.6 or newer.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Text Sensor <config-text_sensor>`.