Merge branch 'current' into next

This commit is contained in:
Jesse Hills 2024-06-05 15:51:19 +12:00
commit bb6a134f66
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
15 changed files with 99 additions and 76 deletions

View File

@ -2,7 +2,7 @@
{ {
"name": "ESPHome - docs", "name": "ESPHome - docs",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11", "image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11",
"postCreateCommand": "pip3 install -r requirements.txt -r requirements_test.txt", "postCreateCommand": ".devcontainer/postCreate.sh",
"postAttachCommand": "make live-html", "postAttachCommand": "make live-html",
"forwardPorts": [8000], "forwardPorts": [8000],
"features": { "features": {

5
.devcontainer/postCreate.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
pip3 install -r requirements.txt -r requirements_test.txt
curl -L https://github.com/CloudCannon/pagefind/releases/download/v1.1.0/pagefind-v1.1.0-x86_64-unknown-linux-musl.tar.gz | tar -xz -C ~/.local/bin

View File

@ -44,7 +44,7 @@ submit a feature request (see FAQ).
+---------------------------------------+---------------------+----------------------+ +---------------------------------------+---------------------+----------------------+
| :ref:`LG<climate_ir_lg>` | ``climate_ir_lg`` | yes | | :ref:`LG<climate_ir_lg>` | ``climate_ir_lg`` | yes |
+---------------------------------------+---------------------+----------------------+ +---------------------------------------+---------------------+----------------------+
| Midea | ``midea_ir`` | yes | | :ref:`Midea<midea_ir>` | ``midea_ir`` | yes |
+---------------------------------------+---------------------+----------------------+ +---------------------------------------+---------------------+----------------------+
| :ref:`Mitsubishi<mitsubishi>` | ``mitsubishi`` | yes | | :ref:`Mitsubishi<mitsubishi>` | ``mitsubishi`` | yes |
+---------------------------------------+---------------------+----------------------+ +---------------------------------------+---------------------+----------------------+
@ -169,35 +169,6 @@ IR receiver.
name: "Living Room AC" name: "Living Room AC"
receiver_id: rcvr receiver_id: rcvr
.. _midea_ir:
``midea_ir`` Climate
-------------------------
These air conditioners support two protocols: Midea and Coolix. Therefore, when using an IR receiver, it considers both protocols and publishes the received states.
Additional configuration is available for this platform
Configuration variables:
- **use_fahrenheit** (*Optional*, boolean): Allows you to transfer the temperature to the air conditioner in degrees Fahrenheit. The air conditioner display also shows the temperature in Fahrenheit. Defaults to ``false``.
.. code-block:: yaml
# Example configuration entry
climate:
- platform: midea_ir
name: "AC"
sensor: room_temperature
use_fahrenheit: true
.. note::
- See :ref:`Transmit Midea<remote_transmitter-transmit_midea>` to send custom commands, including Follow Me mode.
- See :ref:`Toshiba<toshiba>` below if you are looking for compatibility with Midea model MAP14HS1TBL or similar.
.. _climate_ir_lg: .. _climate_ir_lg:
``climate_ir_lg`` Climate ``climate_ir_lg`` Climate
@ -272,6 +243,34 @@ Known working with:
- Delonghi PAC WE 120HP - Delonghi PAC WE 120HP
.. _midea_ir:
``midea_ir`` Climate
-------------------------
These air conditioners support two protocols: Midea and Coolix. Therefore, when using an IR receiver, it considers both protocols and publishes the received states.
Additional configuration is available for this platform
Configuration variables:
- **use_fahrenheit** (*Optional*, boolean): Allows you to transfer the temperature to the air conditioner in degrees Fahrenheit. The air conditioner display also shows the temperature in Fahrenheit. Defaults to ``false``.
.. code-block:: yaml
# Example configuration entry
climate:
- platform: midea_ir
name: "AC"
sensor: room_temperature
use_fahrenheit: true
.. note::
- See :ref:`Transmit Midea<remote_transmitter-transmit_midea>` to send custom commands, including Follow Me mode.
- See :ref:`Toshiba<toshiba>` below if you are looking for compatibility with Midea model MAP14HS1TBL or similar.
.. _mitsubishi: .. _mitsubishi:
``mitsubishi`` Climate ``mitsubishi`` Climate

View File

@ -62,7 +62,6 @@ Configuration variables:
of hiding one of them. Defaults to ``false``. of hiding one of them. Defaults to ``false``.
- **has_position** (*Optional*, boolean): Whether this cover will publish its position as a floating point number. - **has_position** (*Optional*, boolean): Whether this cover will publish its position as a floating point number.
By default (``false``), the cover only publishes OPEN/CLOSED position. By default (``false``), the cover only publishes OPEN/CLOSED position.
Parameter useless if you set the POSITION_ACTION (is set to TRUE).
- **tilt_action** (*Optional*, :ref:`Action <config-action>`): The action that should - **tilt_action** (*Optional*, :ref:`Action <config-action>`): The action that should
be performed when the remote (like Home Assistant's frontend) requests the cover be set to a specific be performed when the remote (like Home Assistant's frontend) requests the cover be set to a specific
tilt position. The desired tilt is available in the lambda in the ``tilt`` variable. tilt position. The desired tilt is available in the lambda in the ``tilt`` variable.
@ -71,6 +70,7 @@ Configuration variables:
- **position_action** (*Optional*, :ref:`Action <config-action>`): The action that should - **position_action** (*Optional*, :ref:`Action <config-action>`): The action that should
be performed when the remote (like Home Assistant's frontend) requests the cover be set to a specific be performed when the remote (like Home Assistant's frontend) requests the cover be set to a specific
position. The desired position is available in the lambda in the ``pos`` variable. position. The desired position is available in the lambda in the ``pos`` variable.
Useless if `has_position` is not set to ``true``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Cover <config-cover>`. - All other options from :ref:`Cover <config-cover>`.

View File

@ -86,14 +86,17 @@ This can be handled at the **stop_action** by using the following lambda functio
stop_action: stop_action:
- lambda: !lambda |- - lambda: !lambda |-
if (id(cover).last_operation() == CoverOperation::COVER_OPERATION_OPENING) { if (id(cover).get_last_operation() == CoverOperation::COVER_OPERATION_OPENING) {
// Cover is currently opening // Cover is currently opening
id(cover_button_down).press(); id(cover_button_down).press();
} else if (id(cover).last_operation() == CoverOperation::COVER_OPERATION_CLOSING) { } else if (id(cover).get_last_operation() == CoverOperation::COVER_OPERATION_CLOSING) {
// Cover is currently closing // Cover is currently closing
id(cover_button_up).press(); id(cover_button_up).press();
} }
Be aware that ``get_last_operation`` will only return the last opening or closing operation, but not the last idle operation.
This issue is tracked `here <https://github.com/esphome/issues/issues/4252#issuecomment-2132727377>`_.
See Also See Also
-------- --------

View File

@ -174,8 +174,10 @@ Test Setting:
Camera uses PWM timer #1. If you need PWM (via the ``ledc`` platform) you need to manually specify Camera uses PWM timer #1. If you need PWM (via the ``ledc`` platform) you need to manually specify
a channel there (with the ``channel: 2`` parameter) a channel there (with the ``channel: 2`` parameter)
Configuration for Ai-Thinker Camera Configuration examples
----------------------------------- ----------------------
**Ai-Thinker Camera**:
.. warning:: .. warning::
@ -203,8 +205,7 @@ Configuration for Ai-Thinker Camera
name: My Camera name: My Camera
# ... # ...
Configuration for M5Stack Camera **M5Stack Camera**:
--------------------------------
.. warning:: .. warning::
@ -235,8 +236,7 @@ Configuration for M5Stack Camera
name: My Camera name: My Camera
# ... # ...
Configuration for M5Stack Timer Camera X/F **M5Stack Timer Camera X/F**:
------------------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -258,8 +258,7 @@ Configuration for M5Stack Timer Camera X/F
name: My Camera name: My Camera
# ... # ...
Confguration for M5Stack M5CameraF New **M5Stack M5CameraF New**:
--------------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -277,8 +276,7 @@ Confguration for M5Stack M5CameraF New
pixel_clock_pin: GPIO21 pixel_clock_pin: GPIO21
reset_pin: GPIO15 reset_pin: GPIO15
Configuration for Wrover Kit Boards **Wrover Kit Boards**:
-----------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -299,8 +297,7 @@ Configuration for Wrover Kit Boards
name: My Camera name: My Camera
# ... # ...
Configuration for TTGO T-Camera V05 **TTGO T-Camera V05**:
-----------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -322,8 +319,7 @@ Configuration for TTGO T-Camera V05
name: My Camera name: My Camera
# ... # ...
Configuration for TTGO T-Camera V162 **TTGO T-Camera V162**:
------------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -346,8 +342,7 @@ Configuration for TTGO T-Camera V162
name: My Camera name: My Camera
# ... # ...
Configuration for TTGO T-Camera V17 **TTGO T-Camera V17**:
-----------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -371,8 +366,7 @@ Configuration for TTGO T-Camera V17
name: My Camera name: My Camera
# ... # ...
Configuration for TTGO T-Journal **TTGO T-Journal**:
--------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -394,8 +388,7 @@ Configuration for TTGO T-Journal
# ... # ...
Configuration for TTGO-Camera Plus **TTGO-Camera Plus**:
----------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -418,8 +411,7 @@ Configuration for TTGO-Camera Plus
name: My Camera name: My Camera
# ... # ...
Configuration for TTGO-Camera Mini **TTGO-Camera Mini**:
----------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -440,8 +432,7 @@ Configuration for TTGO-Camera Mini
name: My Camera name: My Camera
# ... # ...
Configuration for ESP-EYE **ESP-EYE**:
----------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -462,8 +453,7 @@ Configuration for ESP-EYE
name: My Camera name: My Camera
# ... # ...
Configuration for ESP32S3_EYE on `Freenove ESP32-S3-DevKitC-1 <https://github.com/Freenove/Freenove_ESP32_S3_WROOM_Board>`_ **ESP32S3_EYE** on `Freenove ESP32-S3-DevKitC-1 <https://github.com/Freenove/Freenove_ESP32_S3_WROOM_Board>`__:
---------------------------------------------------------------------------------------------------------------------------
.. code-block:: yaml .. code-block:: yaml
@ -490,6 +480,26 @@ Configuration for ESP32S3_EYE on `Freenove ESP32-S3-DevKitC-1 <https://github.co
name: My Camera name: My Camera
# ... # ...
**Seeed Studio XIAO ESP32S3 Sense**:
.. code-block:: yaml
esp32_camera:
external_clock:
pin: GPIO10
frequency: 20MHz
i2c_pins:
sda: GPIO40
scl: GPIO39
data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
vsync_pin: GPIO38
href_pin: GPIO47
pixel_clock_pin: GPIO13
# Image settings
name: My Camera
# ...
See Also See Also
-------- --------

View File

@ -703,14 +703,14 @@ the strip and shifts them forward every ``add_led_interval``.
- red: 100% - red: 100%
green: 100% green: 100%
blue: 100% blue: 100%
num_leds: 1 num_leds: 5
gradient: true
- red: 0% - red: 0%
green: 0% green: 0%
blue: 0% blue: 0%
num_leds: 1 num_leds: 1
add_led_interval: 100ms add_led_interval: 100ms
reverse: false reverse: false
gradient: false
Configuration variables: Configuration variables:

View File

@ -31,6 +31,7 @@ The :ref:`I²C <i2c>` or :ref:`SPI <spi>` is required to be set up in your confi
tvoc: tvoc:
name: "ENS160 Total Volatile Organic Compounds" name: "ENS160 Total Volatile Organic Compounds"
aqi: aqi:
id: ens160_air_quality_index
name: "ENS160 Air Quality Index" name: "ENS160 Air Quality Index"
update_interval: 60s update_interval: 60s
address: 0x53 address: 0x53

View File

@ -72,12 +72,12 @@ Advanced:
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`. - All other options from :ref:`Sensor <config-sensor>`.
- **compensation** (*Optional*): The block containing sensors used for compensation. - **compensation** (*Optional*): The block containing sensors used for compensation. Both values must be supplied in order to be able to generate the absolute humidity to be reported to the sensor.
- **temperature_source** (*Optional*, :ref:`config-id`): Give an external temperature sensor ID - **temperature_source** (*Optional*, :ref:`config-id`): Give an external temperature sensor ID
here. This can improve the sensor's internal calculations. here. The data must be in Celsius. This can improve the sensor's internal calculations.
- **humidity_source** (*Optional*, :ref:`config-id`): Give an external humidity sensor ID - **humidity_source** (*Optional*, :ref:`config-id`): Give an external relative humidity sensor ID
here. This can improve the sensor's internal calculations. here. This can improve the sensor's internal calculations.
.. _sgp30-calibrating: .. _sgp30-calibrating:

View File

@ -11,7 +11,6 @@ Once configured, you can use any of the 8 pins for your projects. Up-to 256 shif
to provide more pins, without using more GPIO pins on the controller. They are linked by connecting pin Q of the closer to provide more pins, without using more GPIO pins on the controller. They are linked by connecting pin Q of the closer
shift register to the pin QH of the next shift register. shift register to the pin QH of the next shift register.
.. code-block:: yaml .. code-block:: yaml
# Example configuration entry # Example configuration entry
@ -28,12 +27,11 @@ Configuration variables:
- **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC165 component. - **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC165 component.
- **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Serial Output (QH) input. - **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Serial Output (QH) input.
- **clock_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Clock (CLK) pin - **clock_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Clock (CLK) pin.
- **load_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Load input (SH/LD) pin - **load_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Load input (SH/LD) pin.
- **clock_inhibit_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Clock Inhibit (CLK INH) pin - **clock_inhibit_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Clock Inhibit (CLK INH) pin. The use of it is optional, as it can be directly connected to ground.
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up-to 256. Defaults to ``1``. - **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up-to 256. Defaults to ``1``.
Pin configuration variables: Pin configuration variables:
**************************** ****************************
@ -62,7 +60,6 @@ Pin configuration variables:
See Also See Also
-------- --------
- :doc:`binary_sensor/gpio` - :doc:`binary_sensor/gpio`
- :apiref:`SN74HC165/SN74HC165.h` - :apiref:`SN74HC165/SN74HC165.h`
- :ghedit:`Edit` - :ghedit:`Edit`

View File

@ -181,6 +181,15 @@ In the ``seconds:``, ``minutes:``, ... fields you can use the following operator
then: then:
- switch.toggle: my_switch - switch.toggle: my_switch
.. note::
``on_time`` does not re-schedule events for times that are skipped or duplicated due to local Daylight
Saving Time or other local time-adjustments like leap seconds. In regions with Daylight Saving Time, this
means that events located between 01:00 - 02:00 may trigger twice, and events scheduled between 02:00 - 03:00 may
be skipped once a year. This differs from `cron <https://man7.org/linux/man-pages/man8/cron.8.html>`__ behavior
despite allowing the use of similar `crontab` syntax. Similarly, triggers on days of the month that do not exist
("every 31st of the month") will be skipped when those dates do not exist.
.. _time-on_time_sync: .. _time-on_time_sync:
``on_time_sync`` Trigger ``on_time_sync`` Trigger

View File

@ -75,7 +75,7 @@ Configuration variables:
Defaults to ``.local``. Defaults to ``.local``.
- **reboot_timeout** (*Optional*, :ref:`config-time`): The amount of time to wait before rebooting when no - **reboot_timeout** (*Optional*, :ref:`config-time`): The amount of time to wait before rebooting when no
WiFi connection exists. Can be disabled by setting this to ``0s``, but note that the low level IP stack currently WiFi connection exists. Can be disabled by setting this to ``0s``, but note that the low level IP stack currently
seems to have issues with WiFi where a full reboot is required to get the interface back working. Defaults to ``15min``. seems to have issues with WiFi where a full reboot is required to get the interface back working. Defaults to ``15min``. Does not apply when in access point mode.
- **power_save_mode** (*Optional*, string): The power save mode for the WiFi interface. - **power_save_mode** (*Optional*, string): The power save mode for the WiFi interface.
See :ref:`wifi-power_save_mode` See :ref:`wifi-power_save_mode`

View File

@ -39,8 +39,7 @@ For all projects
- Network configuration must assume defaults (no static IPs or DNS configured) - Network configuration must assume defaults (no static IPs or DNS configured)
- It **must** compile successfully without any user changes after adopting it. - It **must** compile successfully without any user changes after adopting it.
- All configuration is contained within a single YAML file. Fully remote packages are permitted if using ``import_full_config: true``. - All configuration is contained within a single YAML file. Fully remote packages are permitted if using ``import_full_config: true``.
- Your product name cannot contain "**ESPHome**" except in the case of *ending with* "**for ESPHome**"
- Your product name cannot contain **ESPHome** except in the case of *ending with* **for ESPHome**
When your project matches all requirements of the Made for ESPHome program, 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 you can apply for permission to carry the logo by emailing esphome@nabucasa.com

View File

@ -131,7 +131,7 @@ Supported Microcontrollers
RP2040, components/rp2040, rp2040.svg RP2040, components/rp2040, rp2040.svg
BK72xx, components/libretiny, bk72xx.svg BK72xx, components/libretiny, bk72xx.svg
RTL87xx, components/libretiny, rtl87xx.svg RTL87xx, components/libretiny, rtl87xx.svg
host, components/host, host.svg host, components/host, host.svg, dark-invert
Microcontroller Peripherals Microcontroller Peripherals
--------------------------- ---------------------------

View File

@ -251,7 +251,7 @@ def lint_ext_check(fname: str, stat: os.stat_result):
) )
@lint_file_check(exclude=["script/*", "lint.py"]) @lint_file_check(exclude=["script/*", ".devcontainer/*", "lint.py"])
def lint_executable_bit(fname: str, stat: os.stat_result): def lint_executable_bit(fname: str, stat: os.stat_result):
ex = EXECUTABLE_BIT[fname] ex = EXECUTABLE_BIT[fname]
if ex != 100644: if ex != 100644: