How to use the temperusb.temper.TemperHandler function in temperusb

To help you get started, we’ve selected a few temperusb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github home-assistant / home-assistant / homeassistant / components / sensor / temper.py View on Github external
def get_temper_devices():
    """Scan the Temper devices from temperusb."""
    from temperusb.temper import TemperHandler
    return TemperHandler().get_devices()
github home-assistant / home-assistant / homeassistant / components / temper / sensor.py View on Github external
def get_temper_devices():
    """Scan the Temper devices from temperusb."""

    return TemperHandler().get_devices()
github padelt / temper-python / temperusb / cli.py View on Github external
def main():
    args = parse_args()
    quiet = args.celsius or args.fahrenheit or args.humidity

    logging.basicConfig(level = logging.ERROR if quiet else logging.WARNING)

    th = TemperHandler()
    devs = th.get_devices()
    if not quiet:
        print("Found %i devices" % len(devs))

    readings = []

    for dev in devs:
        if args.sensor_count is not None:
            # Override auto-detection from args
            dev.set_sensor_count(int(args.sensor_count))

        if args.sensor_ids == 'all':
            sensors = range(dev.get_sensor_count())
        else:
            sensors = [int(args.sensor_ids)]

temperusb

Reads temperature from TEMPerV1 devices (USB 0c45:7401)

GPL-3.0
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis