@@ -12,7 +12,9 @@ def __init__(self):
12
12
super (AnalogSensor , self ).__init__ ()
13
13
self ._beta = None
14
14
self ._c = None
15
+ self ._high_reading = None
15
16
self ._last_reading = None
17
+ self ._low_reading = None
16
18
self ._name = None
17
19
self ._offset_adj = 0.0
18
20
self ._port = None
@@ -40,6 +42,15 @@ def c(self) -> Union[float, None]:
40
42
def c (self , value ):
41
43
self ._c = float (value ) if value is not None else None
42
44
45
+ @property
46
+ def high_reading (self ) -> Union [float , None ]:
47
+ """High sensor reading (only linear analog sensors, otherwise null)"""
48
+ return self ._high_reading
49
+
50
+ @high_reading .setter
51
+ def high_reading (self , value ):
52
+ self ._high_reading = float (value ) if value is not None else None
53
+
43
54
@property
44
55
def last_reading (self ) -> Union [float , None ]:
45
56
"""Last sensor reading (in C) or null if invalid"""
@@ -48,6 +59,15 @@ def last_reading(self) -> Union[float, None]:
48
59
@last_reading .setter
49
60
def last_reading (self , value ):
50
61
self ._last_reading = float (value ) if value is not None else None
62
+
63
+ @property
64
+ def low_reading (self ) -> Union [float , None ]:
65
+ """Low sensor reading (only linear analog sensors, otherwise null)"""
66
+ return self ._low_reading
67
+
68
+ @low_reading .setter
69
+ def low_reading (self , value ):
70
+ self ._low_reading = float (value ) if value is not None else None
51
71
52
72
@property
53
73
def name (self ) -> Union [str , None ]:
0 commit comments