Skip to content

Commit f579dbd

Browse files
committed
Add address property
1 parent ed008a9 commit f579dbd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

adafruit_ds18x20.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,11 @@ def read_temperature(self) -> float:
155155
"""Read the temperature. No polling of the conversion busy bit
156156
(assumes that the conversion has completed)."""
157157
return self._read_temp()
158+
159+
@property
160+
def address(self):
161+
"""Returns the address of the device. Might be useful if there are multiple sensors on
162+
the bus.
163+
164+
Note: this property is read only."""
165+
return self._address

0 commit comments

Comments
 (0)