

def __new__(self):
    '\n        Return an instance of the first subclass of\n        :class:`braubuddy.envcontroller.IEnvController` for which a device is\n        discovered.\n        '
    log('Auto-discovering Environmental Controller.')
    try:
        envcontroller = Tosr0xEnvController()
        log('Tosr0x Environmental Controller detected.')
        return self
    except DeviceError:
        log('No Tosr0x Environmental Controllers detected.')
    log.error('No compatible Environmental Controllers detected. Using Dummy device.')
    return DummyEnvController()

dataset/ETHPy150Open amorphic/braubuddy/braubuddy/envcontroller/auto.py AutoEnvController.__new__/VarMisuse@33/120 `envcontroller`->`self`