We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4e29ae commit de73934Copy full SHA for de73934
opensensor/collection_apis.py
@@ -54,14 +54,14 @@
54
"Moisture": "moisture_readings",
55
}
56
57
-column_translation = {
+environment_translation = {
58
"temp": "temp",
59
"rh": "rh",
60
"pressure": "pressure",
61
- "percent": "lux",
62
- "ppm": "ppm_CO2",
+ "lux": "lux",
+ "co2": "ppm_CO2",
63
+ "moisture": "moisture_readings",
64
"pH": "pH",
- "readings": "moisture_readings",
65
66
67
@@ -121,7 +121,7 @@ def _record_data_to_ts_collection(
121
model_instance.pop("timestamp", None)
122
123
# Translate to the combined collection field names
124
- column_name = column_translation[column_name]
+ column_name = environment_translation[column_name]
125
126
for key, value in model_instance.items():
127
if value is not None:
0 commit comments