From 0429b540115e04d00a171263a60412ae98bb3c24 Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Mon, 6 Dec 2021 20:14:20 +0100 Subject: [PATCH] Add FAQ entry on testing PRs with external components (#1579) --- guides/faq.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/guides/faq.rst b/guides/faq.rst index 9947f4ade..574fc56d7 100644 --- a/guides/faq.rst +++ b/guides/faq.rst @@ -351,7 +351,6 @@ The top level ``name:`` field in your .yaml file defines the node name(/hostname Important: follow these `instructions `_ to use the ``use_address`` parameter when renaming a live device, as the connection to an existing device will only work with the old name until the name change is complete. - Why am I getting a warning about strapping pins? -------------------------------------------------- @@ -361,6 +360,30 @@ While the use of them in software is not a problem, if there's something attache 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. Note that some boards connect pins such as GPIO0 to a builtin tactile switch. In these cases using the strapping pins is not a problem. + +How can I test a Pull Request? +------------------------------ + +By leveraging the :doc:`external components ` feature, it's possible to test most Pull +Requests by simply adding a few lines to your YAML! You need the number of the Pull Request, as well as the components +that have been added or changed by the Pull Request (they are listed with the "integration:" labels on the GitHub page +of the Pull Request). Then, if you add a block of code like the following to your YAML file, once you recompile and +flash your device, the code from the Pull Request will be used for the components changed by the Pull Request. + +.. code-block:: yaml + + external_components: + # replace 1234 with the number of the Pull Request + - source: github://pr#1234 + components: + # list all components modified by this Pull Request here + - ccs811 + + +Note that this only works for Pull Requests that only change files within components. If any files outside +``esphome/components/`` are added or changed, this method unfortunately doesn't work. Those Pull Requests are labeled +with the "core" label on GitHub. + See Also --------