|
18 | 18 | # Helpers: |
19 | 19 | class DataClass(str, Enum): |
20 | 20 | TEMPERATURE = "temperature" |
21 | | - HUMIDITY = "humidity" |
22 | 21 | PRESSURE = "pressure" |
23 | | - LIGHT_INTENSITY = "light intensity" |
24 | 22 | COMMENT = "comment" |
25 | 23 | BATTERY = "remaining battery" |
| 24 | + BEACON = "beacon challenge" |
26 | 25 |
|
27 | 26 | class DataPoint(): |
28 | 27 | """A class for storing and handling datapoints""" |
@@ -56,30 +55,24 @@ class Temperature(DataPoint): |
56 | 55 | def __init__(self, value): |
57 | 56 | super().__init__(DataClass.TEMPERATURE, value) |
58 | 57 |
|
59 | | -class Humidity(DataPoint): |
60 | | - """A class for DataPoints that store humidity values""" |
61 | | - UNIT = "%" |
62 | | - def __init__(self, value): |
63 | | - super().__init__(DataClass.HUMIDITY, value) |
64 | | - |
65 | 58 | class Pressure(DataPoint): |
66 | 59 | """A class for DataPoints that store barometric pressure values""" |
67 | 60 | UNIT="inHg" |
68 | 61 | def __init__(self, value): |
69 | 62 | super().__init__(DataClass.PRESSURE, value) |
70 | 63 |
|
71 | | -class Intensity(DataPoint): |
72 | | - """A class for DataPoints that store light intensity values""" |
73 | | - UNIT="lux" |
74 | | - def __init__(self, value): |
75 | | - super().__init__(DataClass.LIGHT_INTENSITY, value) |
76 | | - |
77 | 64 | class Text(DataPoint): |
78 | 65 | """A class reserved for DataPoints that are intended as a text comment""" |
79 | 66 | UNIT="" # No unit for regular strings of text |
80 | 67 | def __init__(self, value: str): |
81 | 68 | super().__init__(DataClass.COMMENT, value) |
82 | 69 |
|
| 70 | +class BeaconChallenge(DataPoint): |
| 71 | + """A class reserved for DataPoints that are in response to a message from the beacon""" |
| 72 | + UNIT="" # No unit for regular strings of text |
| 73 | + def __init__(self, value: str): |
| 74 | + super().__init__(DataClass.BEACON, value) |
| 75 | + |
83 | 76 | class BatteryLevel(DataPoint): |
84 | 77 | """A class reserved for DataPoints that are intended as an indication of battery level""" |
85 | 78 | UNIT="%" # No unit for regular strings of text |
|
0 commit comments