view py/sensor.py @ 305:6087c692d381

turn the fridge off if both sensors are broken
author Matt Johnston <matt@ucc.asn.au>
date Wed, 24 Jul 2019 23:24:51 +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)