Merge branch 'current' into next

This commit is contained in:
Jesse Hills 2023-03-15 21:20:00 +13:00
commit 4774c1f999
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
12 changed files with 80 additions and 40 deletions

View File

@ -50,7 +50,7 @@ Configuration variables:
- **enable_pin** (*Optional*, :ref:`config-id`): The id of the
:ref:`float output <output>` connected to the Enable pin of the h-bridge (if h-bridge uses enable).
- **decay_mode** (*Optional*, string): The decay mode you want to use with
the h-bridge. Either ``slow`` (braking) or ``fast`` (coasting). Defaults to ``slow``.
the h-bridge. Either ``slow`` (coasting) or ``fast`` (braking). Defaults to ``slow``.
- **speed_count** (*Optional*, int): Set the number of supported discrete speed levels. The value is used
to calculate the percentages for each speed. E.g. ``2`` means that you have 50% and 100% while ``100``
will allow 1% increments in the output. Defaults to ``100``.

View File

@ -64,7 +64,7 @@ Individual keys can be added independently to ESPHome as ``binary_sensor``:
id: key4
row: 1
col: 0
- platform: keypad
- platform: matrix_keypad
id: keyA
key: A

View File

@ -171,7 +171,7 @@ With Docker:
.. code-block:: bash
docker run --rm -v "${PWD}":/config -it esphome/esphome clean-mqtt configuration.yaml
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome clean-mqtt configuration.yaml
This will remove all retained messages with the topic
``<DISCOVERY_PREFIX>/+/NODE_NAME/#``. If you want to purge on another

View File

@ -66,7 +66,9 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Use this if you have
multiple remote receivers.
Automations:
------------
- **on_aeha** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
AEHA remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::AEHAData`
@ -143,6 +145,21 @@ Automations:
Toshiba AC remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::ToshibaAcData`
is passed to the automation for use in lambdas.
.. code-block:: yaml
# Example automation for decoded signals
remote_receiver:
...
on_samsung:
then:
- if:
condition:
or:
- lambda: 'return (x.data == 0xE0E0E01F);' # VOL+ newer type
- lambda: 'return (x.data == 0xE0E0E01F0);' # VOL+ older type
then:
- ...
.. _remote-receiver-binary-sensor:
Binary Sensor

View File

@ -10,9 +10,12 @@ This component exposes the different gas concentration sensors from the `MiCS-45
.. note::
The sensor has a 3-minute warmup period where data is unreliable and ESPHome will only start publishing sensor values after this time.
If the sensor was already powered only, such as if you restarted or updated your ESPHome device, then it will start publishing immediately.
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
.. code-block:: yaml
# Example configuration entry

View File

@ -39,12 +39,19 @@ This :ref:`Condition <config-condition>` checks if time has been set and is vali
.. code-block:: yaml
# Example configuration
on_...:
if:
condition:
time.has_time:
then:
- logger.log: Time has been set and is valid!
# Example lambda
lambda: |-
if (id(my_time).now().is_valid()) {
//do something here
}
.. _time-on_time:

View File

@ -30,12 +30,12 @@ In some cases only **TX** or **RX** exists as the device at the other end only a
On the ESP32, this component uses the hardware UART units and is thus very accurate. On the ESP8266 however,
ESPHome has to use a software implementation as there are no other hardware UART units available other than the
ones used for logging. Therefore the UART data on the ESP8266 can have occasional data glitches especially with
higher baud rates..
higher baud rates.
.. note::
From ESPHome 2021.8 the ``ESP8266SoftwareSerial`` UART ``write_byte`` function had the parity bit fixed to be correct
for the data being sent. This could cause unexpected issues if you are using the Software Serial and have devices that
for the data being sent. This could cause unexpected issues if you are using the Software UART and have devices that
explicity check the parity. Most likely you will need to flip the ``parity`` flag in YAML.
@ -65,7 +65,7 @@ Configuration variables:
Hardware UARTs
--------------
Whenever possible, ESPHome will use the hardware UART unit on the processor for fast and accurate communication.
Whenever possible, ESPHome will use the hardware UART unit on the ESP8266 for fast and accurate communication.
When the hardware UARTs are all occupied, ESPHome will fall back to a software implementation that may not
be accurate at higher baud rates.
@ -74,12 +74,16 @@ be accurate at higher baud rates.
logger and leave others available. If you have configured the logger to use a different hardware UART, the pins
used for hardware sharing change accordingly.
The ESP32 has three UARTs. Any pair of GPIO pins can be used, as long as they support the proper output/input modes.
The ESP32 has three UARTs. ESP32 lite variant chips (ESP32-S3, ESP32-C3, ESP32-S2, etc) may have fewer UARTs (usually two). Any pair of GPIO pins can be used, as long as they support the proper output/input modes.
The ESP8266 has two UARTs; the second of which is TX-only. Only a limited set of pins can be used. ``UART0`` may
use either ``tx_pin: GPIO1`` and ``rx_pin: GPIO3``, or ``tx_pin: GPIO15`` and ``rx_pin: GPIO13``. ``UART1`` must
use ``tx_pin: GPIO2``. Any other combination of pins will result in use of a software UART.
.. note::
The the Software UART is only available on the ESP8266. It is not available on ESP32 and variants.
.. _uart-write_action:
``uart.write`` Action

View File

@ -93,11 +93,11 @@ Build
.. note::
The easiest way is to use the `esphome-docs Docker image <https://hub.docker.com/r/esphome/esphome-docs/>`__:
The easiest way is to use the `esphome-docs container image <ghcr.io/esphome/esphome-docs/>`__:
.. code-block:: bash
docker run --rm -v "${PWD}/":/data/esphomedocs -p 8000:8000 -it esphome/esphome-docs
docker run --rm -v "${PWD}/":/data/esphomedocs -p 8000:8000 -it ghcr.io/esphome/esphome-docs
With ``PWD`` referring to the root of the ``esphome-docs`` git repository. Then go to ``<CONTAINER_IP>:8000`` in your browser.
@ -662,10 +662,10 @@ Standard for the esphome-core codebase:
.. code-block:: bash
# Full lint+test suite
docker run --rm -v "${PWD}/":/esphome -it esphome/esphome-lint script/fulltest
docker run --rm -v "${PWD}/":/esphome -it ghcr.io/esphome/esphome-lint script/fulltest
# Run lint only over changed files
docker run --rm -v "${PWD}/":/esphome -it esphome/esphome-lint script/quicklint
docker run --rm -v "${PWD}/":/esphome -it ghcr.io/esphome/esphome-lint script/quicklint
If you are using Windows and have docker installed the syntax is slightly different.
@ -676,7 +676,7 @@ Standard for the esphome-core codebase:
# convert the volume format
$current_dir=(Get-Location).Path.ToLower().Replace(':','').Replace('\','/')
# Run lint only over changed files from powershell
docker run --rm -v "$($current_dir):/esphome" -it esphome/esphome-lint script/quicklint
docker run --rm -v "$($current_dir):/esphome" -it ghcr.io/esphome/esphome-lint script/quicklint

View File

@ -36,7 +36,7 @@ Tips for using ESPHome
.. code-block:: yaml
- timing: !include click-single.yaml
- timing: !include click-single.yaml
then:
- mqtt.publish:
topic: ${device_name}/button${id}/status
@ -158,7 +158,7 @@ It's simple. Run:
pip3 install -U esphome
# From docker:
docker pull esphome/esphome:latest
docker pull ghcr.io/esphome/esphome:stable
And in Home Assistant, there's a simple UPDATE button when there's an update
available as with all add-ons.
@ -178,7 +178,7 @@ by installing the tested beta:
pip3 install --pre -U esphome
# For docker-based installs
docker run [...] -it esphome/esphome:beta run livingroom.yaml
docker run [...] -it ghcr.io/esphome/esphome:beta run livingroom.yaml
For Home Assistant supervised installs add the community addons beta repository by
adding
@ -198,11 +198,11 @@ To install the dev version of ESPHome:
- In Home Assistant: Add the ESPHome repository `https://github.com/esphome/home-assistant-addon <https://github.com/esphome/home-assistant-addon>`__
in Add-on store -> Repositories. Then install the add-on ``ESPHome Dev``
- From ``pip``: Run ``pip3 install https://github.com/esphome/esphome/archive/dev.zip``
- From docker, use the `esphome/esphome:dev <https://hub.docker.com/r/esphome/esphome/tags?page=1&name=dev>`__ image
- From docker, use the `ghcr.io/esphome/esphome:dev <https://github.com/esphome/esphome/pkgs/container/esphome/>`__ image
.. code-block:: bash
docker run [...] -it esphome:dev livingroom.yaml compile
docker run [...] -it ghcr.io/esphome/esphome:dev livingroom.yaml compile
The latest dev docs are here: `next.esphome.io <https://next.esphome.io/>`__
@ -305,37 +305,37 @@ Install versions:
.. code-block:: bash
# Stable Release
docker pull esphome/esphome
docker pull ghcr.io/esphome/esphome
# Beta
docker pull esphome/esphome:beta
docker pull ghcr.io/esphome/esphome:beta
# Dev version
docker pull esphome/esphome:dev
docker pull ghcr.io/esphome/esphome:dev
Command reference:
.. code-block:: bash
# Start a new file wizard for file livingroom.yaml
docker run --rm -v "${PWD}":/config -it esphome/esphome wizard livingroom.yaml
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome wizard livingroom.yaml
# Compile and upload livingroom.yaml
docker run --rm -v "${PWD}":/config -it esphome/esphome run livingroom.yaml
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome run livingroom.yaml
# View logs
docker run --rm -v "${PWD}":/config -it esphome/esphome logs livingroom.yaml
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome logs livingroom.yaml
# Map /dev/ttyUSB0 into container
docker run --rm -v "${PWD}":/config --device=/dev/ttyUSB0 -it esphome/esphome ...
docker run --rm -v "${PWD}":/config --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome ...
# Start dashboard on port 6052 (general command)
# Warning: this command is currently not working with Docker on MacOS. (see note below)
docker run --rm -v "${PWD}":/config --net=host -it esphome/esphome
docker run --rm -v "${PWD}":/config --net=host -it ghcr.io/esphome/esphome
# Start dashboard on port 6052 (MacOS specific command)
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it esphome/esphome
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it ghcr.io/esphome/esphome
# Setup a bash alias:
alias esphome='docker run --rm -v "${PWD}":/config --net=host -it esphome/esphome'
alias esphome='docker run --rm -v "${PWD}":/config --net=host -it ghcr.io/esphome/esphome'
And a docker compose file looks like this:
@ -345,7 +345,7 @@ And a docker compose file looks like this:
services:
esphome:
image: esphome/esphome
image: ghcr.io/esphome/esphome
volumes:
- ./:/config:rw
# Use local time for logging timestamps
@ -356,7 +356,7 @@ And a docker compose file looks like this:
- /dev/ttyACM0:/dev/ttyACM0
network_mode: host
restart: always
.. _docker-reference-notes:
.. note::
@ -420,7 +420,7 @@ If an external pullup/down changes the configured voltage levels boot failures o
While the use of them in software is not a problem, if there's something attached to the pins (particularly if they're not floating during the bootup) you may run into problems.
It's recommended to avoid them unless you have a pressing need to use them and you have reviewed the expected boot voltage levels of these pins from the ESP datasheet.
Some development boards connect GPIO 0 to a button, often labeled "boot". Holding this button while the ESP is turning on will cause it to go into bootloader mode. Once the ESP is fully booted up, this button can be used as a normal input safely.
Some development boards connect GPIO 0 to a button, often labeled "boot". Holding this button while the ESP is turning on will cause it to go into bootloader mode. Once the ESP is fully booted up, this button can be used as a normal input safely.
How can I test a Pull Request?
------------------------------

View File

@ -14,15 +14,15 @@ Installation
See :doc:`installing_esphome`.
If you're familiar with Docker, you can use that instead!
Note that on macOS Docker `can not pass USB devices through <https://github.com/moby/hyperkit/issues/149>`__.
If you're familiar with Docker, you can use that instead!
Note that on macOS Docker `can not pass USB devices through <https://github.com/moby/hyperkit/issues/149>`__.
You will not be able to flash ESP devices through USB on Mac, all other features will work. Flashing with web dashboard is still possible.
Our image supports AMD64, ARM and ARM64 (AARCH64), and can be downloaded with:
.. code-block:: bash
docker pull esphome/esphome
docker pull ghcr.io/esphome/esphome
If you want to use `docker-compose` instead, here's a sample file:
@ -32,7 +32,7 @@ If you want to use `docker-compose` instead, here's a sample file:
services:
esphome:
container_name: esphome
image: esphome/esphome
image: ghcr.io/esphome/esphome
volumes:
- /path/to/esphome/config:/config
- /etc/localtime:/etc/localtime:ro
@ -80,7 +80,7 @@ file called ``livingroom.yaml``:
esphome wizard livingroom.yaml
# On Docker:
docker run --rm -v "${PWD}":/config -it esphome/esphome wizard livingroom.yaml
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome wizard livingroom.yaml
At the end of this step, you will have your first YAML configuration
file ready. It doesn't do much yet and only makes your device connect to
@ -133,7 +133,7 @@ to your docker command to map a local USB device. Docker on Mac will not be able
.. code-block:: bash
docker run --rm --privileged -v "${PWD}":/config --device=/dev/ttyUSB0 -it esphome/esphome run livingroom.yaml
docker run --rm --privileged -v "${PWD}":/config --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome run livingroom.yaml
Now when you go to the Home Assistant "Integrations" screen (under "Configuration" panel), you
should see the ESPHome device show up in the discovered section (although this can take up to 5 minutes).
@ -179,7 +179,7 @@ for docker you need to supply an additional parameter:
esphome livingroom.yaml run
# On docker
docker run --rm -v "${PWD}":/config -it esphome/esphome run livingroom.yaml
docker run --rm -v "${PWD}":/config -it ghcr.io/esphome/esphome run livingroom.yaml
.. figure:: /components/binary_sensor/images/gpio-ui.png
@ -215,11 +215,11 @@ To start the ESPHome dashboard, simply start ESPHome with the following command
esphome dashboard config/
# On Docker, host networking mode is required for online status indicators
docker run --rm --net=host -v "${PWD}":/config -it esphome/esphome
docker run --rm --net=host -v "${PWD}":/config -it ghcr.io/esphome/esphome
# On Docker with MacOS, the host networking option doesn't work as expected. An
# alternative is to use the following command if you are a MacOS user.
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it esphome/esphome
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it ghcr.io/esphome/esphome
After that, you will be able to access the dashboard through ``localhost:6052``.

View File

@ -78,7 +78,14 @@ in ``/config/esphome/garage-door.yaml``.
.. note::
Since Home Assistant add-ons run as individual containers, accessing these through command line is not very straightforward, but it's possible. To do that, install Home Assistant's SSH addon, configure a username and a password, and disable `Protection Mode` (please assess the risks you take with that). Then, for example to access the logs form a device through an SSH client, log in, and you can use a command like `docker exec -it addon_15ef4d2f_esphome esphome logs /config/esphome/garage-door.yaml`. See :doc:`getting_started_command_line` for more.
Since Home Assistant add-ons run as individual containers, accessing these through
command line is not very straightforward, but it's possible. To do that,
install Home Assistant's SSH addon, configure a username and a password,
and disable `Protection Mode` (please assess the risks you take with that).
Then, for example to access the logs form a device through an SSH client,
log in, and you can use a command like
`docker exec -it addon_15ef4d2f_esphome esphome logs /config/esphome/garage-door.yaml`.
See :doc:`getting_started_command_line` for more.
Now go ahead and use one of the :ref:`devices guides <devices>` to extend your configuration.

View File

@ -17,11 +17,13 @@ Requirements
Your product has to match the following requirements:
- Your project is powered by ESPHome
- Your project is powered by an ESP32
- Your ESPHome configuration is open source
- Users should be able to apply updates if your project sells ready-made devices
- Your project supports adoption via the ``dashboard_import`` feature of ESPHome
(see :doc:`Sharing </guides/creators>`)
- Your product name cannot contain **ESPHome** except in the case of *ending with* **for ESPHome**
- Your configuration utilises ``esp32_improv`` and ``improv_serial`` (if a USB connection is available) for easy end-user provisioning.
When your project matches all requirements of the Made for ESPHome program,
you can apply for permission to carry the logo by emailing esphome@nabucasa.com