Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DISC] Additional RF discovery keys and device classes #1927

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading