view py/sensor.py @ 282:d3ebdb1d6a55

fridge sensor is back
author Matt Johnston <matt@ucc.asn.au>
date Mon, 30 Nov 2015 21:40:57 +0800
parents 4cbcbba567ab
children
line wrap: on
line source

import os

def make_sensor(server):
    if server.test_mode():
        import sensor_test
        return sensor_test.SensorTest(server)
    else:
        import sensor_ds18b20
        return sensor_ds18b20.SensorDS18B20(server)