Skip to content

Commit

Permalink
[DISC] Additional RF discovery keys and device classes (#1927)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiH authored Apr 5, 2024
1 parent bf70508 commit b884ee8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 14 additions & 6 deletions main/config_RF.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ struct RTL_433device {
bool isDisc;
};

const char parameters[40][4][24] = {
const char parameters[50][4][24] = {
// RTL_433 key, name, unit, device_class
{"temperature_C", "temperature", "°C", "temperature"},
{"temperature_1_C", "temperature", "°C", "temperature"},
{"temperature_2_C", "temperature", "°C", "temperature"},
{"temperature_F", "temperature", "°F", "temperature"},
{"time", "timestamp", "", "timestamp"},
{"battery_ok", "battery", "%", "battery"},
{"battery_mV", "battery", "mV", "voltage"},
{"humidity", "humidity", "%", "humidity"},
{"moisture", "moisture", "%", "humidity"},
{"pressure_hPa", "pressure", "hPa", "pressure"},
Expand All @@ -108,19 +109,26 @@ const char parameters[40][4][24] = {
{"rain_rate_in_h", "rain", "in/h", "precipitation_intensity"},
{"rssi", "rssi", "dB", "signal_strength"},
{"snr", "snr", "dB", ""},
{"noise", "noise", "dB", ""},
{"depth_cm", "depth", "cm", ""},
{"noise", "noise", "dB", "sound_pressure"},
{"depth_cm", "depth", "cm", "distance"},
{"power_W", "power", "W", "power"},
{"light_lux", "light", "lx", "illuminance"},
{"lux", "lux", "lx", "illuminance"},
{"uvi", "UVI", "UV index", ""},
{"uv", "UV", "UV level", ""},
{"storm_dist", "storm distance", "mi", ""},
{"strike_distance", "strike distance", "mi", ""},
{"storm_dist", "storm distance", "mi", "distance"},
{"storm_dist_km", "storm distance", "km", "distance"},
{"strike_count", "strike count", "", ""}, // from rtl_433_mqtt_hass.py
{"strike_distance", "strike distance", "mi", "distance"},
{"strike_distance_km", "strike distance", "km", "distance"},
{"co2_ppm", "Carbon Dioxide", "ppm", "carbon_dioxide"},
{"pm2_5_ug_m3", "PM2.5", "μg/m³", "pm25"},
{"pm10_ug_m3", "PM10", "μg/m³", "pm10"},
{"estimated_pm10_0_ug_m3", "estimated PM10", "μg/m³", "pm10"},
{"pm1_ug_m3", "PM1", "μg/m³", "pm1"},
{"tamper", "tamper", "", ""},
{"alarm", "alarm", "", ""},
{"motion", "motion", "", "motion"},
{"strike_count", "strike count", "", ""}, // from rtl_433_mqtt_hass.py
{"event", "Status", "", "moisture"}};
# endif
# ifdef RTL_433_DISCOVERY_LOGGING
Expand Down
2 changes: 2 additions & 0 deletions main/config_mqttDiscovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ const char* availableHASSClasses[] = {"battery",
"lock",
"motion",
"moving",
"pm1",
"pm10",
"pm25",
"power",
Expand All @@ -208,6 +209,7 @@ const char* availableHASSClasses[] = {"battery",
"problem",
"restart",
"signal_strength",
"sound_pressure",
"temperature",
"timestamp",
"voltage",
Expand Down

0 comments on commit b884ee8

Please sign in to comment.