From d707e92d595de7e3f9d9816f2a24ae3f1ab5a5ad Mon Sep 17 00:00:00 2001 From: Proddy Date: Wed, 20 Jul 2022 12:02:32 +0200 Subject: [PATCH] formatting --- RELEASENOTES.md | 1 - RELEASENOTES_DEV.md | 1 - src/analogsensor.cpp | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 9e4ad89d6..2f0fec68c 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -3,4 +3,3 @@ # Firmware Installation Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries in the Assets below. - diff --git a/RELEASENOTES_DEV.md b/RELEASENOTES_DEV.md index 75d8a9422..193af6e88 100644 --- a/RELEASENOTES_DEV.md +++ b/RELEASENOTES_DEV.md @@ -5,4 +5,3 @@ This is a snapshot of the current "beta" development code and firmware binaries # Firmware Installation Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries in the Assets below. - diff --git a/src/analogsensor.cpp b/src/analogsensor.cpp index 5e6010e34..0851a62e3 100644 --- a/src/analogsensor.cpp +++ b/src/analogsensor.cpp @@ -411,10 +411,10 @@ void AnalogSensor::publish_values(const bool force) { snprintf(str, sizeof(str), "analogsensor_%d", sensor.gpio()); config["uniq_id"] = str; - + if (sensor.uom() != DeviceValueUOM::NONE) { config["unit_of_meas"] = EMSdevice::uom_to_string(sensor.uom()); - } + } JsonObject dev = config.createNestedObject("dev"); JsonArray ids = dev.createNestedArray("ids");