diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 039c0e50f..6ad70c37e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ { "name": "ESPHome - docs", "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", "forwardPorts": [8000], "features": { diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh new file mode 100755 index 000000000..a8215c138 --- /dev/null +++ b/.devcontainer/postCreate.sh @@ -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 diff --git a/components/climate/climate_ir.rst b/components/climate/climate_ir.rst index 9cb410abc..e2f0bbacd 100644 --- a/components/climate/climate_ir.rst +++ b/components/climate/climate_ir.rst @@ -44,7 +44,7 @@ submit a feature request (see FAQ). +---------------------------------------+---------------------+----------------------+ | :ref:`LG` | ``climate_ir_lg`` | yes | +---------------------------------------+---------------------+----------------------+ -| Midea | ``midea_ir`` | yes | +| :ref:`Midea` | ``midea_ir`` | yes | +---------------------------------------+---------------------+----------------------+ | :ref:`Mitsubishi` | ``mitsubishi`` | yes | +---------------------------------------+---------------------+----------------------+ @@ -169,35 +169,6 @@ IR receiver. name: "Living Room AC" 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` to send custom commands, including Follow Me mode. - - See :ref:`Toshiba` below if you are looking for compatibility with Midea model MAP14HS1TBL or similar. - - .. _climate_ir_lg: ``climate_ir_lg`` Climate @@ -272,6 +243,34 @@ Known working with: - 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` to send custom commands, including Follow Me mode. + - See :ref:`Toshiba` below if you are looking for compatibility with Midea model MAP14HS1TBL or similar. + .. _mitsubishi: ``mitsubishi`` Climate diff --git a/components/cover/template.rst b/components/cover/template.rst index 8b6a5f430..9d6b82692 100644 --- a/components/cover/template.rst +++ b/components/cover/template.rst @@ -62,7 +62,6 @@ Configuration variables: of hiding one of them. Defaults to ``false``. - **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. - Parameter useless if you set the POSITION_ACTION (is set to TRUE). - **tilt_action** (*Optional*, :ref:`Action `): The action that should 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. @@ -71,6 +70,7 @@ Configuration variables: - **position_action** (*Optional*, :ref:`Action `): The action that should 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. + Useless if `has_position` is not set to ``true``. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - All other options from :ref:`Cover `. diff --git a/components/cover/time_based.rst b/components/cover/time_based.rst index d50f8e445..d87994822 100644 --- a/components/cover/time_based.rst +++ b/components/cover/time_based.rst @@ -86,14 +86,17 @@ This can be handled at the **stop_action** by using the following lambda functio stop_action: - 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 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 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 `_. + See Also -------- diff --git a/components/esp32_camera.rst b/components/esp32_camera.rst index 5db3104ff..cc146c7a7 100644 --- a/components/esp32_camera.rst +++ b/components/esp32_camera.rst @@ -174,8 +174,10 @@ Test Setting: 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) -Configuration for Ai-Thinker Camera ------------------------------------ +Configuration examples +---------------------- + +**Ai-Thinker Camera**: .. warning:: @@ -203,8 +205,7 @@ Configuration for Ai-Thinker Camera name: My Camera # ... -Configuration for M5Stack Camera --------------------------------- +**M5Stack Camera**: .. warning:: @@ -235,8 +236,7 @@ Configuration for M5Stack Camera name: My Camera # ... -Configuration for M5Stack Timer Camera X/F ------------------------------------------- +**M5Stack Timer Camera X/F**: .. code-block:: yaml @@ -258,8 +258,7 @@ Configuration for M5Stack Timer Camera X/F name: My Camera # ... -Confguration for M5Stack M5CameraF New --------------------------------------- +**M5Stack M5CameraF New**: .. code-block:: yaml @@ -277,8 +276,7 @@ Confguration for M5Stack M5CameraF New pixel_clock_pin: GPIO21 reset_pin: GPIO15 -Configuration for Wrover Kit Boards ------------------------------------ +**Wrover Kit Boards**: .. code-block:: yaml @@ -299,8 +297,7 @@ Configuration for Wrover Kit Boards name: My Camera # ... -Configuration for TTGO T-Camera V05 ------------------------------------ +**TTGO T-Camera V05**: .. code-block:: yaml @@ -322,8 +319,7 @@ Configuration for TTGO T-Camera V05 name: My Camera # ... -Configuration for TTGO T-Camera V162 ------------------------------------- +**TTGO T-Camera V162**: .. code-block:: yaml @@ -346,8 +342,7 @@ Configuration for TTGO T-Camera V162 name: My Camera # ... -Configuration for TTGO T-Camera V17 ------------------------------------ +**TTGO T-Camera V17**: .. code-block:: yaml @@ -371,8 +366,7 @@ Configuration for TTGO T-Camera V17 name: My Camera # ... -Configuration for TTGO T-Journal --------------------------------- +**TTGO T-Journal**: .. code-block:: yaml @@ -394,8 +388,7 @@ Configuration for TTGO T-Journal # ... -Configuration for TTGO-Camera Plus ----------------------------------- +**TTGO-Camera Plus**: .. code-block:: yaml @@ -418,8 +411,7 @@ Configuration for TTGO-Camera Plus name: My Camera # ... -Configuration for TTGO-Camera Mini ----------------------------------- +**TTGO-Camera Mini**: .. code-block:: yaml @@ -440,8 +432,7 @@ Configuration for TTGO-Camera Mini name: My Camera # ... -Configuration for ESP-EYE ----------------------------------- +**ESP-EYE**: .. code-block:: yaml @@ -462,8 +453,7 @@ Configuration for ESP-EYE name: My Camera # ... -Configuration for ESP32S3_EYE on `Freenove ESP32-S3-DevKitC-1 `_ ---------------------------------------------------------------------------------------------------------------------------- +**ESP32S3_EYE** on `Freenove ESP32-S3-DevKitC-1 `__: .. code-block:: yaml @@ -490,6 +480,26 @@ Configuration for ESP32S3_EYE on `Freenove ESP32-S3-DevKitC-1 ` or :ref:`SPI ` is required to be set up in your confi tvoc: name: "ENS160 Total Volatile Organic Compounds" aqi: + id: ens160_air_quality_index name: "ENS160 Air Quality Index" update_interval: 60s address: 0x53 diff --git a/components/sensor/sgp30.rst b/components/sensor/sgp30.rst index 65494c952..e54b4021e 100644 --- a/components/sensor/sgp30.rst +++ b/components/sensor/sgp30.rst @@ -72,12 +72,12 @@ Advanced: - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - All other options from :ref:`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 - 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. .. _sgp30-calibrating: diff --git a/components/sn74hc165.rst b/components/sn74hc165.rst index 6af4544a4..7e29bddd3 100644 --- a/components/sn74hc165.rst +++ b/components/sn74hc165.rst @@ -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 shift register to the pin QH of the next shift register. - .. code-block:: yaml # Example configuration entry @@ -28,12 +27,11 @@ Configuration variables: - **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC165 component. - **data_pin** (**Required**, :ref:`Pin Schema `): Pin connected to SN74HC165 Serial Output (QH) input. -- **clock_pin** (**Required**, :ref:`Pin Schema `): Pin connected to SN74HC165 Clock (CLK) pin -- **load_pin** (**Required**, :ref:`Pin Schema `): Pin connected to SN74HC165 Load input (SH/LD) pin -- **clock_inhibit_pin** (**Required**, :ref:`Pin Schema `): Pin connected to SN74HC165 Clock Inhibit (CLK INH) pin +- **clock_pin** (**Required**, :ref:`Pin Schema `): Pin connected to SN74HC165 Clock (CLK) pin. +- **load_pin** (**Required**, :ref:`Pin Schema `): Pin connected to SN74HC165 Load input (SH/LD) pin. +- **clock_inhibit_pin** (*Optional*, :ref:`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``. - Pin configuration variables: **************************** @@ -62,7 +60,6 @@ Pin configuration variables: See Also -------- - - :doc:`binary_sensor/gpio` - :apiref:`SN74HC165/SN74HC165.h` - :ghedit:`Edit` diff --git a/components/time/index.rst b/components/time/index.rst index fb62ac596..0332ccc84 100644 --- a/components/time/index.rst +++ b/components/time/index.rst @@ -181,6 +181,15 @@ In the ``seconds:``, ``minutes:``, ... fields you can use the following operator then: - 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 `__ 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: ``on_time_sync`` Trigger diff --git a/components/wifi.rst b/components/wifi.rst index 0451567ec..61ec80546 100644 --- a/components/wifi.rst +++ b/components/wifi.rst @@ -75,7 +75,7 @@ Configuration variables: Defaults to ``.local``. - **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 - 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. See :ref:`wifi-power_save_mode` diff --git a/guides/made_for_esphome.rst b/guides/made_for_esphome.rst index 48d2828ac..4c1b92c8f 100644 --- a/guides/made_for_esphome.rst +++ b/guides/made_for_esphome.rst @@ -39,8 +39,7 @@ For all projects - Network configuration must assume defaults (no static IPs or DNS configured) - 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``. - -- 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, you can apply for permission to carry the logo by emailing esphome@nabucasa.com diff --git a/index.rst b/index.rst index 93d2b4ba7..5e9f234fc 100644 --- a/index.rst +++ b/index.rst @@ -131,7 +131,7 @@ Supported Microcontrollers RP2040, components/rp2040, rp2040.svg BK72xx, components/libretiny, bk72xx.svg RTL87xx, components/libretiny, rtl87xx.svg - host, components/host, host.svg + host, components/host, host.svg, dark-invert Microcontroller Peripherals --------------------------- diff --git a/lint.py b/lint.py index 7240ee97e..e0d3e4c3f 100644 --- a/lint.py +++ b/lint.py @@ -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): ex = EXECUTABLE_BIT[fname] if ex != 100644: