1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 07:45:56 +00:00

Upgrade ArduinoJson to 6.18.5 and migrate code (#2844)

This commit is contained in:
Jesse Hills
2022-01-01 22:31:43 +13:00
committed by GitHub
parent 23edb18d7e
commit 33f17f75a0
40 changed files with 126 additions and 231 deletions

View File

@@ -63,7 +63,7 @@ bool MQTTComponent::send_discovery_() {
return global_mqtt_client->publish_json(
this->get_discovery_topic_(discovery_info),
[this](JsonObject &root) {
[this](JsonObject root) {
SendDiscoveryConfig config;
config.state_topic = true;
config.command_topic = true;
@@ -127,7 +127,7 @@ bool MQTTComponent::send_discovery_() {
}
}
JsonObject &device_info = root.createNestedObject(MQTT_DEVICE);
JsonObject device_info = root.createNestedObject(MQTT_DEVICE);
device_info[MQTT_DEVICE_IDENTIFIERS] = get_mac_address();
device_info[MQTT_DEVICE_NAME] = node_name;
device_info[MQTT_DEVICE_SW_VERSION] = "esphome v" ESPHOME_VERSION " " + App.get_compilation_time();