Source code for herosdevices.hardware.analog_devices.ds18b20

"""Module for ds18b20 temperature sensor probe representations."""

from herosdevices.core.bus import OneWire
from herosdevices.core.bus.onewire import W1ThermBusConsumer
from herosdevices.helper import mark_driver


[docs] @mark_driver( state="beta", info="Temperature Sensor -55°C to 125°C", product_page="https://www.analog.com/en/products/ds18b20.html", ) class DS18B20(OneWire): """One wire temperature sensor type DS18B20.""" _default_observables = [("temperature", float, "mdegC")]
[docs] @mark_driver( state="beta", info="Temperature Sensor -55°C to 125°C (via a shared OneWireBusMaster)", product_page="https://www.analog.com/en/products/ds18b20.html", ) class DS18B20BusConsumer(W1ThermBusConsumer): """DS18B20 temperature sensor, read from a shared OneWireBusMaster's cache instead of sysfs directly."""