padelt / temper-python

libusb/PyUSB-based driver to read TEMPer USB HID devices (USB ID 0c45:7401) and serve as a NetSNMP passpersist module
Other
182 stars 76 forks source link

feat(TemperDevice): add get_product function #133

Closed tamcore closed 1 year ago

tamcore commented 1 year ago

As the title says, this adds a tiny function, to get the product name of the used device.

devices = temperusb.TemperHandler().get_devices()

for device_id, device in enumerate(devices):
    print(device.get_temperature(), device.get_product())
# python3 test.py
27.0625 TEMPerV1.4