Merge branch 'current' into beta

This commit is contained in:
Jesse Hills 2022-11-14 13:31:38 +13:00
commit 028f40a8ea
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
5 changed files with 20 additions and 5 deletions

View File

@ -26,7 +26,7 @@ def add_component_details(app, pagename, templatename, context, doctree):
page_data = {
"title": context["title"],
"url": context["pageurl"],
"path": context["pagename"],
"path": f"components/{component_name}",
}
if os.path.exists(os.path.join(app.builder.srcdir, "images", component_name + ".png")):
page_data["image"] = app.builder.config.html_baseurl + "/_images/" + component_name + ".png"

View File

@ -7,7 +7,7 @@ Button Component
.. note::
To attach a physical buttons to ESPHome, see
To attach a physical button to ESPHome, see
:doc:`GPIO Binary Sensor </components/binary_sensor/gpio>`.
ESPHome has support for components to create button entities in Home Assistant. A button entity is

View File

@ -181,6 +181,21 @@ Configuration for ESP32-Ethernet-Kit board
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO5
Configuration for M5Stack PoESP32 Unit
--------------------------------------
.. code-block:: yaml
ethernet:
type: IP101
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO5
See Also
--------

View File

@ -30,7 +30,7 @@ Configuration variables:
power supply so that it can be used by the outputs.
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The
GPIO pin to control the power supply on.
- **enable_time** (*Optional*, :ref:`config-time`): The time to
- **enable_time** (*Optional*, :ref:`config-time`): The time
that the power supply needs for startup. The output component will
wait for this period of time after turning on the PSU and before
switching the output on. Defaults to ``20ms``.

View File

@ -157,7 +157,7 @@ custom components that communicate using MQTT.
publish("the/other/topic", 42);
}
}
void on_json_message(JsonObject &root) {
void on_json_message(JsonObject root) {
if (!root.containsKey("key"))
return;
@ -165,7 +165,7 @@ custom components that communicate using MQTT.
// do something with Json Object
// publish JSON using lambda syntax
publish_json("the/other/json/topic", [=](JsonObject &root2) {
publish_json("the/other/json/topic", [=](JsonObject root2) {
root2["key"] = "Hello World";
});
}