mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-26 22:21:38 +01:00
Merge branch 'current' into patch-1
This commit is contained in:
commit
1b5ebcdaf1
@ -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
|
||||
|
@ -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";
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user