Skip to content

Commit

Permalink
Merge branch 'current' into lvgl-next-cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Sep 15, 2024
2 parents 3fa2c2f + 02d9af5 commit 19d7c2b
Show file tree
Hide file tree
Showing 25 changed files with 236 additions and 105 deletions.
7 changes: 7 additions & 0 deletions components/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ The ESPHome native API is based on a custom TCP protocol using protocol buffers.
the protocol data structure definitions here: `api.proto <https://github.com/esphome/esphome/blob/dev/esphome/components/api/api.proto>`__
A Python library that implements this protocol is `aioesphomeapi <https://github.com/esphome/aioesphomeapi>`__.

.. note::

**Actions** were previously called **Services**. ESPHome changed the name in line with
`Home Assistant <https://developers.home-assistant.io/blog/2024/07/16/service-actions/>`__
but will continue to support YAML with ``services`` and ``homeassistant.service`` for the foreseeable future.
Documentation will only refer to **Actions**.

.. code-block:: yaml
# Example configuration entry
Expand Down
6 changes: 3 additions & 3 deletions components/binary_sensor/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Custom Binary Sensor

.. warning::

Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
6 changes: 3 additions & 3 deletions components/climate/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Custom Climate

.. warning::

Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
6 changes: 3 additions & 3 deletions components/cover/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Custom Cover

.. warning::

Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
2 changes: 1 addition & 1 deletion components/host.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ configuration to Home Assistant (the native MAC address is not readily available

.. note::

HA will not automatically discover an ESPHome instance running on ``host`` using MDNS, and you will need
HA will not automatically discover an ESPHome instance running on ``host`` using mDNS, and you will need
to add it explicitly using the IP address of your host computer.

Many components, especially those interfacing to actual hardware, will not be available when using ``host``. Do not
Expand Down
6 changes: 3 additions & 3 deletions components/light/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Custom Light Output

.. warning::

Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
6 changes: 3 additions & 3 deletions components/output/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Custom Output

.. warning::

Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
24 changes: 12 additions & 12 deletions components/sensor/atm90e32.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Configuration variables:

- **phase_b** (*Optional*): The configuration options for the 2nd phase. Same options as 1st phase.
- **phase_c** (*Optional*): The configuration options for the 3rd phase. Same options as 1st phase.
- **frequency** (*Optional*): Use the frequenycy value calculated by the meter. All options from
- **frequency** (*Optional*): Use the frequency value calculated by the meter. All options from
:ref:`Sensor <config-sensor>`.
- **peak_current_signed** (*Optional*, boolean): Control the peak current output as signed or absolute. Defaults to ``false``.
- **chip_temperature** (*Optional*): Use the chip temperature value. All options from
Expand Down Expand Up @@ -155,7 +155,7 @@ Active Energy
The ATM90E32 chip has a high-precision built-in ability to count the amount of consumed energy on a per-phase basis.
For each phase both the Forward and Reverse active energy is counted in watt-hours.
Forward Active Energy is used to count consumed energy, whereas Reverse Active Energy is used to count exported energy
(e.g. with solar pv installations).
(e.g. with solar PV installations).
The counters are reset every time a given active energy value is read from the ATM90E32 chip.

Current implementation targets users who retrieve the energy values with a regular interval and store them in
Expand All @@ -179,24 +179,24 @@ a time-series-database, e.g. InfluxDB.
id: ct1RAWattHours
state_topic: ${disp_name}/ct1/reverse_active_energy
If the power, power_factor, reactive_power, forward_active_energy, or reverse_active_energy configuraion variables
If the power, power_factor, reactive_power, forward_active_energy, or reverse_active_energy configuration variables
are used, care must be taken to ensure that the line ATM90E32's voltage is from is the same phase as the current
transformer is installed on. This is significant in split-phase or multi phase installations. On a house with 240
split-phase wiring (very common in the US), one simple test is to reverse the orentation of the current transformer
split-phase wiring (very common in the US), one simple test is to reverse the orientation of the current transformer
on a line. If the power factor doesn't change sign, it is likely that the voltage fed to the ATM90E32 is from the other
phase.

The CircuitSetup Expandable 6 channel board can easilly handle this situation by cutting the jumpers JP12/13 to
allow a seperate VA2 to be input on the J3 pads. Make sure that current taps connected to CT 1-3 are on the phase
The CircuitSetup Expandable 6 channel board can easily handle this situation by cutting the jumpers JP12/13 to
allow a separate VA2 to be input on the J3 pads. Make sure that current taps connected to CT 1-3 are on the phase
from which VA is fed (the barrel jack) and the taps connected to CT3-6 are on the phase from which VA2 is fed. See
the CicuitSetup repo for more details on this.

If a mulit board stack is being used, remember to cut JP12/13 on all boards and to feed VA2 to each board. VA is
If a multi board stack is being used, remember to cut JP12/13 on all boards and to feed VA2 to each board. VA is
fed to all boards through the stacking headers. Another detail is that each voltage transformer needs to have the
same polarity; getting this backwards will be just like having it on the wrong phase.

Note that the current measurement is the RMS value so is always positive. They only way to determine directon is to
look at the power factor. If there are only largly resistive loads and no power sources, (PF almost 1), it is simpler
Note that the current measurement is the RMS value so is always positive. They only way to determine direction is to
look at the power factor. If there are only largely resistive loads and no power sources, (PF almost 1), it is simpler
to just create a template sensor that computes power from Irms*Vrms and ignore all these details. On the other
hand, one might be surprised how reactive some loads are and the CirciuitSetup designs are able to
handle these situations well.
Expand Down Expand Up @@ -468,7 +468,7 @@ Harmonic Power

Harmonic power in AC systems refers to deviations from the ideal sinusoidal waveform, caused by multiples of the
fundamental frequency. It results from non-linear loads and can lead to issues like voltage distortion, equipment
overheating, and misoperation of protective devices. The ATM90E32 can output advanced harmonic power measurements
overheating, and miss operation of protective devices. The ATM90E32 can output advanced harmonic power measurements
providing important analysis data for monitoring power anomalies on the bus.

**Harmonic Power Example:**
Expand Down Expand Up @@ -503,8 +503,8 @@ Peak Current

Peak current in AC systems refers to the maximum value of the alternating current waveform. It signifies the highest
magnitude reached during each cycle of the sinusoidal waveform. Peak current is relevant for sizing components and
assessing the capacity of electrical equipment in the system. This advanced measurement is avaiable from the ATM90E32.
Peak current can be displayed in signed or unsigned format using a bolean parameter which spans all phases.
assessing the capacity of electrical equipment in the system. This advanced measurement is available from the ATM90E32.
Peak current can be displayed in signed or unsigned format using a boolean parameter which spans all phases.
The default is false which is unsigned.

**Peak Current Example:**
Expand Down
15 changes: 1 addition & 14 deletions components/sensor/bl0942.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,18 @@ to some pins on your board and the baud rate set to 4800 with 1 stop bit.
.. code-block:: yaml
# Example configuration entry
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 4800
stop_bits: 1
sensor:
- platform: bl0942
uart_id: uart_bus
voltage:
name: 'BL0942 Voltage'
current:
name: 'BL0942 Current'
power:
name: 'BL0942 Power'
filters:
multiply: -1
energy:
name: 'BL0942 Energy'
frequency:
name: "BL0942 Frequency"
accuracy_decimals: 2
update_interval: 60s
Configuration variables:
------------------------
Expand All @@ -49,7 +36,7 @@ Configuration variables:
All options from :ref:`Sensor <config-sensor>`.
- **current** (*Optional*): The current value of the sensor in Amperes. All options from
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): The (active) power value of the sensor in Watts. Note that some power meters will report this in negative values (probably wired backwards), so you may want to use a filter to multiply it by -1. All options from :ref:`Sensor <config-sensor>`.
- **power** (*Optional*): The (active) power value of the sensor in Watts. Note that some power meters will report this in negative values (probably wired backwards), so you may want to use a filter to multiply it by -1. All options from :ref:`Sensor <config-sensor>`.
- **energy** (*Optional*): Use the energy value of the sensor in kWh.
All options from :ref:`Sensor <config-sensor>`.
- **frequency** (*Optional*): The frequency value of the sensor in Hertz. All options from
Expand Down
13 changes: 11 additions & 2 deletions components/sensor/bme280.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,22 @@ Configuration variables:
See :ref:`Oversampling Options <bme280-oversampling>`.
- All other options from :ref:`Sensor <config-sensor>`.

- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
``OFF``, ``2x``, ``4x``, ``16x``. Defaults to ``OFF``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.


I²C Configuration variables:

- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.

SPI Configuration variables:

- **cs_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The CS pin of the BME280 sensor.


.. _bme280-oversampling:

Oversampling Options
Expand Down
14 changes: 6 additions & 8 deletions components/sensor/bmi160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ BMI160 Accelerometer/Gyroscope Sensor

The ``bmi160`` sensor platform allows you to use your BMI160 Accelerometer/Gyroscope
(`datasheet <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmi160-ds000.pdf>`__,
`SparkFun`_) sensors with
ESPHome. The :ref:`I²C Bus <i2c>` is
required to be set up in your configuration for this sensor to work.

This component only does some basic filtering and no calibration. Due to the complexity of
this sensor and the amount of possible configuration options, you should probably
create a custom component by copying and modifying the existing code if you want a specific
new feature. Supporting all possible use-cases would be quite hard.
`SparkFun`_) sensors with ESPHome. The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this
sensor to work.

This component only does some basic filtering and no calibration. Due to the complexity of this sensor and the amount
of possible configuration options, you should probably create an :doc:`external component</components/external_components>`
by copying and modifying the existing code if you want a specific new feature. Supporting all possible use cases would
be quite hard.

.. figure:: images/bmi160-full.jpg
:align: center
Expand Down
6 changes: 3 additions & 3 deletions components/sensor/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Custom Sensor Component

.. warning::

Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
2 changes: 1 addition & 1 deletion components/sensor/jsn_sr04t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Configuration variables:
sensor. Defaults to ``60s``. Not applicable in mode 1.
- **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.
- **model** (*Optional*): Sensor model. Available options: ``jsn_sr04t`` (default) and ``aj_sr04t``.
- **model** (*Optional*): Sensor model. Available options: ``jsn_sr04t`` (default) and ``aj_sr04m``.
- All other options from :ref:`Sensor <config-sensor>`.

See Also
Expand Down
4 changes: 2 additions & 2 deletions components/sensor/lvgl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LVGL Sensor
:description: Instructions for setting up an LVGL widget sensor component.
:image: ../images/lvgl_c_num.png

The ``lvgl`` sensor platform creates a semsor component from an LVGL widget
The ``lvgl`` sensor platform creates a sensor component from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.

Supported widgets are :ref:`lvgl-widget-arc`, :ref:`lvgl-widget-bar`, :ref:`lvgl-widget-slider` and :ref:`lvgl-widget-spinbox`. A single sensor supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome sensor.
Expand All @@ -27,7 +27,7 @@ Example:
.. note::

Widget-specific actions (``lvgl.arc.update``, ``lvgl.bar.update``, ``lvgl.slider.update``, ``lvgl.spinbox.update``, ``lvgl.spinbox.decrement``, ``lvgl.spinbox.increment``) will trigger correspponding component updates to be sent to Home Assistant.
Widget-specific actions (``lvgl.arc.update``, ``lvgl.bar.update``, ``lvgl.slider.update``, ``lvgl.spinbox.update``, ``lvgl.spinbox.decrement``, ``lvgl.spinbox.increment``) will trigger corresponding component updates to be sent to Home Assistant.

See Also
--------
Expand Down
14 changes: 6 additions & 8 deletions components/sensor/mpu6050.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ MPU6050 Accelerometer/Gyroscope Sensor

The ``mpu6050`` sensor platform allows you to use your MPU6050 Accelerometer/Gyroscope
(`datasheet <https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf>`__,
`SparkFun`_) sensors with
ESPHome. The :ref:`I²C Bus <i2c>` is
required to be set up in your configuration for this sensor to work.

This component only does some basic filtering and no calibration. Due to the complexity of
this sensor and the amount of possible configuration options, you should probably
create a custom component by copying and modifying the existing code if you want a specific
new feature. Supporting all possible use-cases would be quite hard.
`SparkFun`_) sensors with ESPHome. The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this
sensor to work.

This component only does some basic filtering and no calibration. Due to the complexity of this sensor and the amount
of possible configuration options, you should probably create an :doc:`external component</components/external_components>`
by copying and modifying the existing code if you want a specific new feature. Supporting all possible use cases would
be quite hard.

.. figure:: images/mpu6050-full.jpg
:align: center
Expand Down
13 changes: 6 additions & 7 deletions components/sensor/mpu6886.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ MPU6886 Accelerometer/Gyroscope Sensor

The ``mpu6886`` sensor platform allows you to use your MPU6886 Accelerometer/Gyroscope
(`datasheet <https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/MPU-6886-000193%2Bv1.1_GHIC_en.pdf>`__,
`M5Stack`_) sensors with
ESPHome. The :ref:`I²C Bus <i2c>` is
required to be set up in your configuration for this sensor to work.
`M5Stack`_) sensors with ESPHome. The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this
sensor to work.

This component only does some basic filtering and no calibration. Due to the complexity of
this sensor and the amount of possible configuration options, you should probably
create a custom component by copying and modifying the existing code if you want a specific
new feature. Supporting all possible use-cases would be quite hard.
This component only does some basic filtering and no calibration. Due to the complexity of this sensor and the amount
of possible configuration options, you should probably create an :doc:`external component</components/external_components>`
by copying and modifying the existing code if you want a specific new feature. Supporting all possible use cases would
be quite hard.

The MPU6886 is built-in in various M5Stack units (e.g., M5Stick C, ATOM Matrix or M5Stack Core2).

Expand Down
Loading

0 comments on commit 19d7c2b

Please sign in to comment.