From beab0f0c777042155a2cc96ec67a51b0504c1bef Mon Sep 17 00:00:00 2001 From: fauthd Date: Tue, 16 Mar 2021 16:00:23 +0100 Subject: [PATCH 1/2] Add global names to Dallas sensors to avoid ugly and other issues in HA --- src/dallassensor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dallassensor.cpp b/src/dallassensor.cpp index a81975d35..37cc04a65 100644 --- a/src/dallassensor.cpp +++ b/src/dallassensor.cpp @@ -379,8 +379,11 @@ void DallasSensor::publish_values(const bool force) { config["uniq_id"] = str; JsonObject dev = config.createNestedObject("dev"); + dev["name"] = FJSON("EMS-ESP Dallas"); // Global name for device (all Dallas sensors, avoids using the very first name for the group) + dev["mf"] = FJSON("Dallas"); // Manufacturer (avoids the ugly in HA) + dev["mdl"] = FJSON("1Wire"); // Model (avoids the ugly in HA) JsonArray ids = dev.createNestedArray("ids"); - ids.add("ems-esp"); + ids.add("ems-esp-dallas"); // Different ids as the other portions of the EMS-ESP char topic[100]; if (dallas_format == Mqtt::Dallas_Format::SENSORID) { From 4d6354db78e172e5ffbbdcef74bdfe58303333b6 Mon Sep 17 00:00:00 2001 From: fauthd <19874899+FauthD@users.noreply.github.com> Date: Tue, 16 Mar 2021 16:47:09 +0100 Subject: [PATCH 2/2] Add stuff to gitignore, add vscode workspace --- .gitignore | 5 ++++- workspace.code-workspace | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 workspace.code-workspace diff --git a/.gitignore b/.gitignore index 501a41241..d14af01c9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ pio_local.ini # OS specific .DS_Store *Thumbs.db +.directory # project specfic /scripts/stackdmp.txt @@ -25,4 +26,6 @@ emsesp /interface/build /interface/node_modules /interface/.eslintcache - +# /interface/package-lock.json # this file will be modified by npm! What can we do here? +package-lock.json +package.json diff --git a/workspace.code-workspace b/workspace.code-workspace new file mode 100644 index 000000000..876a1499c --- /dev/null +++ b/workspace.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file