diff --git a/components.py b/components.py index b68655c56..de0b344d2 100644 --- a/components.py +++ b/components.py @@ -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" diff --git a/components/button/index.rst b/components/button/index.rst index e8054733a..c91b1fac8 100644 --- a/components/button/index.rst +++ b/components/button/index.rst @@ -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 `. ESPHome has support for components to create button entities in Home Assistant. A button entity is diff --git a/components/ethernet.rst b/components/ethernet.rst index 8b257a760..aa62ff8cd 100644 --- a/components/ethernet.rst +++ b/components/ethernet.rst @@ -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 -------- diff --git a/components/power_supply.rst b/components/power_supply.rst index b08311ee5..38e714e42 100644 --- a/components/power_supply.rst +++ b/components/power_supply.rst @@ -30,7 +30,7 @@ Configuration variables: power supply so that it can be used by the outputs. - **pin** (**Required**, :ref:`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``. diff --git a/custom/custom_component.rst b/custom/custom_component.rst index 801df3700..7b65840e1 100644 --- a/custom/custom_component.rst +++ b/custom/custom_component.rst @@ -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"; }); }