From 11558249ee39e6a3e95dfa0c757bcb25c4dc2ff9 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:31:24 +1300 Subject: [PATCH] Add min_version docs (#2342) --- components/esphome.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/components/esphome.rst b/components/esphome.rst index d96877639..8b1cce9eb 100644 --- a/components/esphome.rst +++ b/components/esphome.rst @@ -50,6 +50,8 @@ Advanced options: - **name** (**Required**, string): Name of the project - **version** (**Required**, string): Version of the project +- **min_version** (*Optional*, string): The minimum ESPHome version required to compile this configuration. + See :ref:`esphome-min_version`. Old-style platform options, which have been moved to the platform-specific :doc:`esp32 ` and :doc:`esp8266 ` sections but are still accepted here for compatibility reasons (usage not @@ -129,11 +131,11 @@ too many WiFi/MQTT connection attempts, Over-The-Air updates being applied or th Configuration variables: - **priority** (*Optional*, float): The priority to execute your custom shutdown code. A higher value - means a high priority and in case of shutdown triggers that the code is executed **later**. + means a high priority and in case of shutdown triggers that the code is executed **later**. Priority is used primarily for the initialization order of components. Shutdowns for these components are handled in *reverse* order, such that e.g. sensors (600) are shutdown before the hardware components (800) they depend on. - Please note this is an ESPHome-internal value and any change will not be marked as a breaking change. + Please note this is an ESPHome-internal value and any change will not be marked as a breaking change. Defaults to ``600``. For priority values refer to the list in the :ref:`esphome-on_boot` section. - + - See :ref:`Automation `. .. _esphome-on_loop: @@ -337,6 +339,14 @@ should be ``author_name.project_name``. name: "jesse.leds_party" version: "1.0.0" +.. _esphome-min_version: + +Minimum ESPHome version +----------------------- + +This allows YAML files to specify the minimum version of ESPHome required to compile. +This is useful in the case of packages where a published package might use features only +available in a newer version of ESPHome. This allows for a more friendly error message. See Also --------