[DISC] device class added and Units sorted (#2189)
device class added and Units sorted alphabetically for easier lookup and adding missing units
This commit is contained in:
1 parent
301b3eecd8
commit
828f0a226e
1 file changed
+36
-32
+36
-32
@@ -59,6 +59,7 @@ const char* availableHASSClasses[] = {"battery_charging",
|
|||||||
"duration",
|
"duration",
|
||||||
"energy",
|
"energy",
|
||||||
"enum",
|
"enum",
|
||||||
|
"frequency",
|
||||||
"gas",
|
"gas",
|
||||||
"humidity",
|
"humidity",
|
||||||
"illuminance",
|
"illuminance",
|
||||||
@@ -89,43 +90,46 @@ const char* availableHASSClasses[] = {"battery_charging",
|
|||||||
|
|
||||||
// From https://github.com/home-assistant/core/blob/d7ac4bd65379e11461c7ce0893d3533d8d8b8cbf/homeassistant/const.py#L379
|
// From https://github.com/home-assistant/core/blob/d7ac4bd65379e11461c7ce0893d3533d8d8b8cbf/homeassistant/const.py#L379
|
||||||
// List of units available in Home Assistant
|
// List of units available in Home Assistant
|
||||||
const char* availableHASSUnits[] = {"W",
|
const char* availableHASSUnits[] = {"A",
|
||||||
"kW",
|
|
||||||
"V",
|
|
||||||
"kWh",
|
|
||||||
"A",
|
|
||||||
"W",
|
|
||||||
"°C",
|
|
||||||
"°F",
|
|
||||||
"ms",
|
|
||||||
"s",
|
|
||||||
"min",
|
|
||||||
"hPa",
|
|
||||||
"L",
|
|
||||||
"kg",
|
|
||||||
"lb",
|
|
||||||
"µS/cm",
|
|
||||||
"ppm",
|
|
||||||
"μg/m³",
|
|
||||||
"m³",
|
|
||||||
"mg/m³",
|
|
||||||
"m/s²",
|
|
||||||
"mV",
|
|
||||||
"lx",
|
|
||||||
"Ω",
|
|
||||||
"%",
|
|
||||||
"bar",
|
|
||||||
"bpm",
|
|
||||||
"dB",
|
|
||||||
"dBm",
|
|
||||||
"B",
|
"B",
|
||||||
"UV index",
|
"UV index",
|
||||||
"m/s",
|
"V",
|
||||||
|
"W",
|
||||||
|
"W",
|
||||||
|
"bpm",
|
||||||
|
"bar",
|
||||||
|
"cm",
|
||||||
|
"dB",
|
||||||
|
"dBm",
|
||||||
|
"ft",
|
||||||
|
"h",
|
||||||
|
"hPa",
|
||||||
|
"Hz",
|
||||||
|
"kg",
|
||||||
|
"kW",
|
||||||
|
"kWh",
|
||||||
"km/h",
|
"km/h",
|
||||||
"°",
|
"lb",
|
||||||
|
"lx",
|
||||||
|
"m/s",
|
||||||
|
"m/s²",
|
||||||
|
"m³",
|
||||||
|
"mg/m³",
|
||||||
|
"min",
|
||||||
"mm",
|
"mm",
|
||||||
"mm/h",
|
"mm/h",
|
||||||
"cm"};
|
"ms",
|
||||||
|
"mV",
|
||||||
|
"µS/cm",
|
||||||
|
"μg/m³",
|
||||||
|
"Ω",
|
||||||
|
"%",
|
||||||
|
"°",
|
||||||
|
"°C",
|
||||||
|
"°F",
|
||||||
|
"s",
|
||||||
|
"wb²"
|
||||||
|
};
|
||||||
|
|
||||||
String getMacAddress() {
|
String getMacAddress() {
|
||||||
uint8_t baseMac[6];
|
uint8_t baseMac[6];
|
||||||
|
|||||||
Reference in new issue
Block a user