add times as a new HA UOM - #156

This commit is contained in:
Proddy
2021-10-12 12:59:00 +02:00
parent 50befd8991
commit 3ecf92fa41
4 changed files with 11 additions and 5 deletions

View File

@@ -40,6 +40,7 @@ static const __FlashStringHelper * DeviceValueUOM_s[] __attribute__((__aligned__
F_(seconds),
F_(dbm),
F_(mv),
F_(times),
F_(oclock)
};

View File

@@ -44,9 +44,8 @@ enum DeviceValueType : uint8_t {
};
// Unit Of Measurement mapping - maps to DeviceValueUOM_s in emsdevice.cpp
// uom - also used with HA
// sequence is important!
// Unit Of Measurement mapping - maps to DeviceValueUOM_s in emsdevice.cpp. Sequence is important!!
// also used with HA as uom
enum DeviceValueUOM : uint8_t {
NONE = 0, // 0
@@ -65,7 +64,8 @@ enum DeviceValueUOM : uint8_t {
SECONDS, // 13
DBM, // 14
MV, // 15
OCLOCK // 16
TIMES, // 16
OCLOCK // 17
};

View File

@@ -184,6 +184,7 @@ MAKE_PSTR(kb, "KB")
MAKE_PSTR(seconds, "seconds")
MAKE_PSTR(dbm, "dBm")
MAKE_PSTR(mv, "mV")
MAKE_PSTR(times, "times")
MAKE_PSTR(oclock, "o'clock")
// TAG mapping - maps to DeviceValueTAG_s in emsdevice.cpp