def __init__(self, server, pin): MultiLevelSensor.__init__(self, server, 'dht22-' + str(uid), self.read) DHT.__init__(self, GPIO(pin))
def __init__(self, port=DEFAULT_PORTS["TemperatureSensor"]): Sensor.__init__(self, "TemperatureSensorPro", port) DHT22.__init__(self, Pin(PORT_MAPPING[port])) self.last_measure = 0