mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-29 04:27:32 +02:00
Merge branch 'current' into beta
This commit is contained in:
commit
028f40a8ea
@ -26,7 +26,7 @@ def add_component_details(app, pagename, templatename, context, doctree):
|
|||||||
page_data = {
|
page_data = {
|
||||||
"title": context["title"],
|
"title": context["title"],
|
||||||
"url": context["pageurl"],
|
"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")):
|
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"
|
page_data["image"] = app.builder.config.html_baseurl + "/_images/" + component_name + ".png"
|
||||||
|
@ -7,7 +7,7 @@ Button Component
|
|||||||
|
|
||||||
.. note::
|
.. 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>`.
|
:doc:`GPIO Binary Sensor </components/binary_sensor/gpio>`.
|
||||||
|
|
||||||
ESPHome has support for components to create button entities in Home Assistant. A button entity is
|
ESPHome has support for components to create button entities in Home Assistant. A button entity is
|
||||||
|
@ -181,6 +181,21 @@ Configuration for ESP32-Ethernet-Kit board
|
|||||||
clk_mode: GPIO0_IN
|
clk_mode: GPIO0_IN
|
||||||
phy_addr: 1
|
phy_addr: 1
|
||||||
power_pin: GPIO5
|
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
|
See Also
|
||||||
--------
|
--------
|
||||||
|
@ -30,7 +30,7 @@ Configuration variables:
|
|||||||
power supply so that it can be used by the outputs.
|
power supply so that it can be used by the outputs.
|
||||||
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The
|
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The
|
||||||
GPIO pin to control the power supply on.
|
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
|
that the power supply needs for startup. The output component will
|
||||||
wait for this period of time after turning on the PSU and before
|
wait for this period of time after turning on the PSU and before
|
||||||
switching the output on. Defaults to ``20ms``.
|
switching the output on. Defaults to ``20ms``.
|
||||||
|
@ -157,7 +157,7 @@ custom components that communicate using MQTT.
|
|||||||
publish("the/other/topic", 42);
|
publish("the/other/topic", 42);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void on_json_message(JsonObject &root) {
|
void on_json_message(JsonObject root) {
|
||||||
if (!root.containsKey("key"))
|
if (!root.containsKey("key"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ custom components that communicate using MQTT.
|
|||||||
// do something with Json Object
|
// do something with Json Object
|
||||||
|
|
||||||
// publish JSON using lambda syntax
|
// 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";
|
root2["key"] = "Hello World";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user