mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-27 17:19:08 +03:00
add HA dev section linking all devices to ems-esp
This commit is contained in:
@@ -211,7 +211,7 @@ void Shower::create_ha_discovery() {
|
||||
doc["stat_t"] = "~/shower_active";
|
||||
|
||||
Mqtt::add_ha_bool(doc.as<JsonObject>());
|
||||
Mqtt::add_ha_dev_section(doc.as<JsonObject>(), "Shower Sensor", nullptr, nullptr, nullptr, false);
|
||||
Mqtt::add_ha_dev_section(doc.as<JsonObject>(), "Shower Sensors", nullptr, nullptr, nullptr, false);
|
||||
Mqtt::add_ha_avty_section(doc.as<JsonObject>()); // no conditions
|
||||
|
||||
snprintf(topic, sizeof(topic), "binary_sensor/%s/shower_active/config", Mqtt::basename().c_str());
|
||||
@@ -239,7 +239,7 @@ void Shower::create_ha_discovery() {
|
||||
doc["dev_cla"] = "duration";
|
||||
// doc["ent_cat"] = "diagnostic";
|
||||
|
||||
Mqtt::add_ha_dev_section(doc.as<JsonObject>(), "Shower Sensor", nullptr, nullptr, nullptr, false);
|
||||
Mqtt::add_ha_dev_section(doc.as<JsonObject>(), "Shower Sensors", nullptr, "EMS-ESP", EMSESP_APP_VERSION, true);
|
||||
Mqtt::add_ha_avty_section(doc.as<JsonObject>(), "~/shower_data", "value_json.duration is defined");
|
||||
|
||||
snprintf(topic, sizeof(topic), "sensor/%s/shower_duration/config", Mqtt::basename().c_str());
|
||||
|
||||
Reference in New Issue
Block a user