Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sensor] Tidy up name/id #4150

Merged
merged 3 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions components/sensor/a01nyub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A01NYUB Waterproof Ultrasonic Sensor
:image: a01nyub.jpg
:keywords: ultrasonic, DFRobot, A01NYUB

This sensor allows you to use A01NYUB waterproof ultrasonic sensor by DFRobot
This sensor allows you to use A01NYUB waterproof ultrasonic sensor by DFRobot
(`datasheet <https://wiki.dfrobot.com/A01NYUB%20Waterproof%20Ultrasonic%20Sensor%20SKU:%20SEN0313>`__)
with ESPHome to measure distances. This sensor can measure
ranges between 28 centimeters and 750 centimeters with a resolution of 1 milimeter.
Expand All @@ -27,12 +27,11 @@ To use the sensor, first set up an :ref:`uart` with a baud rate of 9600 and conn
sensor:
- platform: "a01nyub"
name: "Distance"


Configuration variables:
------------------------

- **name** (**Required**, string): The name of the sensor.
- **uart_id** (*Optional*, :ref:`config-id`): The ID of the :ref:`UART bus <uart>` you wish to use for this sensor.
Use this if you want to use multiple UART buses at once.
- All other options from :ref:`Sensor <config-sensor>`.
Expand Down
5 changes: 2 additions & 3 deletions components/sensor/a02yyuw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A02YYUW Waterproof Ultrasonic Sensor
:image: a02yyuw.jpg
:keywords: ultrasonic, DFRobot, A02YYUW

This sensor allows you to use A02YYUW waterproof ultrasonic sensor by DFRobot
This sensor allows you to use A02YYUW waterproof ultrasonic sensor by DFRobot
(`datasheet <https://wiki.dfrobot.com/_A02YYUW_Waterproof_Ultrasonic_Sensor_SKU_SEN0311>`__)
with ESPHome to measure distances. This sensor can measure
ranges between 3 centimeters and 450 centimeters with a resolution of 1 milimeter.
Expand All @@ -27,12 +27,11 @@ To use the sensor, first set up an :ref:`uart` with a baud rate of 9600 and conn
sensor:
- platform: "a02yyuw"
name: "Distance"


Configuration variables:
------------------------

- **name** (**Required**, string): The name of the sensor.
- **uart_id** (*Optional*, :ref:`config-id`): The ID of the :ref:`UART bus <uart>` you wish to use for this sensor.
Use this if you want to use multiple UART buses at once.
- All other options from :ref:`Sensor <config-sensor>`.
Expand Down
1 change: 0 additions & 1 deletion components/sensor/absolute_humidity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ See the links at the bottom of the page for details on absolute humidity and the
Configuration variables:
------------------------

- **name** (**Required**, string): The name for the absolute humidity sensor.
- **temperature** (**Required**, :ref:`config-id`): The sensor that is used to measure the current temperature, in °C.
- **humidity** (**Required**, :ref:`config-id`): The sensor that is used to measure the current relative humidity, in %.
- **equation** (*Optional*): The saturated vapor pressure equation to use (see below).
Expand Down
2 changes: 0 additions & 2 deletions components/sensor/adc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ Configuration variables:

- **pin** (**Required**, :ref:`config-pin`): The pin to measure the voltage on.
Or on the ESP8266 or Raspberry Pi Pico it could alternatively be set to ``VCC``, see :ref:`adc-vcc`.
- **name** (**Required**, string): The name of the voltage sensor.
- **attenuation** (*Optional*): Only on ESP32. Specify the ADC
attenuation to use. See :ref:`adc-esp32_attenuation`. Defaults to ``0db``.
- **raw** (*Optional*): Allows to read the raw ADC output without any conversion or calibration. See :ref:`adc-raw`. Defaults to ``false``.
- **samples** (*Optional*): The amount of ADC readings to take per sensor update. On the ESP32 this value is ignored if ``attenuation`` is set to ``auto``. Defaults to ``1``.
- **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>`.

.. note::
Expand Down
3 changes: 1 addition & 2 deletions components/sensor/ads1115.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,16 @@ Configuration variables:
- **multiplexer** (**Required**): The multiplexer channel of this sensor. Effectively means between which pins you
want to measure voltage.
- **gain** (**Required**, float): The gain of this sensor.
- **name** (**Required**, string): The name for this sensor.
- **ads1115_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the
:ref:`ADS1115 Hub <ads1115-component>` you want to use this 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.
- **resolution** (*Optional*, string): the resolution of this sensor. Defaults to ``16 bits``.

- ``16 bits``
- ``12 bits``

- All other options from :ref:`Sensor <config-sensor>`.

Multiplexer and Gain
--------------------
Expand Down
8 changes: 2 additions & 6 deletions components/sensor/aht10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,11 @@ Configuration variables:

- **temperature** (**Required**): The information for the temperature sensor.

- **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>`.
- All 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>`.
- All options from :ref:`Sensor <config-sensor>`.

- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

Expand Down
8 changes: 2 additions & 6 deletions components/sensor/am2320.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,11 @@ Configuration variables:

- **temperature** (**Required**): The information for the temperature sensor.

- **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>`.
- All 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>`.
- All options from :ref:`Sensor <config-sensor>`.

- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

Expand Down
9 changes: 3 additions & 6 deletions components/sensor/am43.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,11 @@ Configuration variables:
- **ble_client_id** (**Required**, :ref:`config-id`): The id of the ``ble_client`` entry associated with the device.
- **battery_level** (*Optional*): The information for the battery level sensor.

- **name** (**Required**, string): The name for the battery level sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **illuminance** (*Optional*): The information for the light level sensor.

- **name** (**Required**, string): The name for the light level sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
Expand Down
4 changes: 0 additions & 4 deletions components/sensor/apds9960.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ measurements.

Configuration variables:

- **name** (**Required**, string): The name for the sensor.
- **type** (**Required**, string): The type of sensor measurement. One of

- ``CLEAR``
Expand All @@ -78,7 +77,6 @@ Configuration variables:
- ``BLUE``
- ``PROXIMITY``

- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.

Binary Sensor
Expand All @@ -89,15 +87,13 @@ measurements.

Configuration variables:

- **name** (**Required**, string): The name for the binary sensor.
- **direction** (**Required**, string): The direction to measure. One of:

- ``UP``
- ``DOWN``
- ``LEFT``
- ``RIGHT``

- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.

Troubleshooting:
Expand Down
19 changes: 9 additions & 10 deletions components/sensor/b_parasite.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,23 @@ Configuration variables
- **mac_address** (**Required**): The MAC address of the device.
- **temperature** (*Optional*): Air temperature in Celsius.

- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **humidity** (*Optional*): Relative air humidity in %.

- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **moisture** (*Optional*): Soil moisture in %.

- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **battery_voltage** (*Optional*): Battery voltage in volts.

- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **illuminance** (*Optional*): Illuminance in lux.

- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

See Also
--------
Expand Down
3 changes: 0 additions & 3 deletions components/sensor/bh1750.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ your configuration for this sensor to work.
Configuration variables:
------------------------

- **name** (**Required**, string): The name for the sensor.
- **address** (*Optional*, int): Manually specify the I²C address of the sensor.
Defaults to ``0x23`` (address if address pin is pulled low). If the address pin is pulled high,
the address is ``0x5C``.
- **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>`.

See Also
Expand Down
1 change: 0 additions & 1 deletion components/sensor/binary_sensor_map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ The maximum amount of observations/channels supported is 64.
Configuration variables:
------------------------

- **name** (**Required**, string): The name of the sensor.
- **type** (**Required**, string): The sensor type. Should be one of: ``BAYESIAN``, ``GROUP``, or ``SUM``.
- **channels** (**Required for GROUP or SUM types**): A list of channels that are mapped to certain values.

Expand Down
2 changes: 0 additions & 2 deletions components/sensor/ble_rssi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ instructions for setting up this platform.
Configuration variables:
------------------------

- **name** (**Required**, string): The name of the sensor.
- **mac_address** (*Optional*, MAC Address): The MAC address to track for this
sensor. Note that exactly one of ``mac_address``, ``irk``, ``service_uuid`` or ``ibeacon_uuid``
must be present.
Expand All @@ -67,7 +66,6 @@ Configuration variables:
same building.
- **ibeacon_minor** (*Optional*, int): The iBeacon minor identifier of the beacon that needs
to be tracked. Usually used to identify beacons within an iBeacon group.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.

See Also
Expand Down
12 changes: 2 additions & 10 deletions components/sensor/bme680.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,25 @@ Configuration variables:

- **temperature** (*Optional*): The information for the temperature sensor.

- **name** (**Required**, string): The name for the temperature sensor.
- **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>`.

- **pressure** (*Optional*): The information for the pressure sensor.

- **name** (**Required**, string): The name for the pressure sensor.
- **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>`.

- **humidity** (*Optional*): The information for the humidity sensor.

- **name** (**Required**, string): The name for the humidity sensor.
- **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>`.

- **gas_resistance** (*Optional*): 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>`.
- All options from :ref:`Sensor <config-sensor>`.

- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x76``. Another address can be ``0x77``.
Expand Down Expand Up @@ -132,7 +124,7 @@ Add indoor air quality (IAQ) calculation and IAQ label, based on the values in t
name: "BME680 Indoor Air Quality"
id: iaq
icon: "mdi:gauge"
# calculation: comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh]
# calculation: comp_gas = log(R_gas[ohm]) + 0.04 log(Ohm)/%rh * hum[%rh]
lambda: |-
return log(id(gas_resistance).state) + 0.04 * id(humidity).state;
state_class: "measurement"
Expand Down
30 changes: 6 additions & 24 deletions components/sensor/bme680_bsec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,54 +125,38 @@ Configuration variables:

- **temperature** (*Optional*): The information for the temperature sensor.

- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- **sample_rate** (*Optional*, string): Optional sample rate override for this sensor. Can be ``lp`` for low power consumption, sampling every 3 seconds or ``ulp`` for ultra-low power, sampling every 5 minutes.
- All other options from :ref:`Sensor <config-sensor>`.

- **pressure** (*Optional*): 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.
- **sample_rate** (*Optional*, string): Optional sample rate override for this sensor. Can be ``lp`` for low power consumption, sampling every 3 seconds or ``ulp`` for ultra-low power, sampling every 5 minutes.
- 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.
- **sample_rate** (*Optional*, string): Optional sample rate override for this sensor. Can be ``lp`` for low power consumption, sampling every 3 seconds or ``ulp`` for ultra-low power, sampling every 5 minutes.
- All other options from :ref:`Sensor <config-sensor>`.

- **gas_resistance** (*Optional*): 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>`.
- All options from :ref:`Sensor <config-sensor>`.

- **iaq** (*Optional*): The information for the IAQ sensor.

- **name** (**Required**, string): The name for the IAQ sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **iaq_accuracy** (*Optional*): The information for the numeric IAQ accuracy sensor.

- **name** (**Required**, string): The name for the IAQ accuracy sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **co2_equivalent** (*Optional*): The information for the CO₂ equivalent sensor.

- **name** (**Required**, string): The name for the CO₂ equivalent sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

- **breath_voc_equivalent** (*Optional*): The information for the Breath VOC equivalent humidity sensor.

- **name** (**Required**, string): The name for the Breath VOC equivalent sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- All options from :ref:`Sensor <config-sensor>`.

Text Sensor
-----------
Expand All @@ -186,9 +170,7 @@ Configuration variables:
- **iaq_accuracy** (*Optional*): The information for the IAQ accuracy sensor. Shows: Stabilizing,
Uncertain, Calibrating, Calibrated.

- **name** (**Required**, string): The name for the IAQ accuracy sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`TextSensor <config-text_sensor>`.
- All options from :ref:`TextSensor <config-text_sensor>`.

.. figure:: images/bme680-bsec-ui.png
:align: center
Expand Down
9 changes: 2 additions & 7 deletions components/sensor/bmp085.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,11 @@ Configuration variables:

- **temperature** (*Optional*): The information for the temperature sensor.

- **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>`.
- All options from :ref:`Sensor <config-sensor>`.

- **pressure** (*Optional*): 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>`.
- All options from :ref:`Sensor <config-sensor>`.

- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x77``.
Expand Down
Loading