diff --git a/dali/device/helpers.py b/dali/device/helpers.py index e628f01..4c250a7 100644 --- a/dali/device/helpers.py +++ b/dali/device/helpers.py @@ -127,8 +127,7 @@ def autodiscover( if isinstance(rsp, QueryDeviceStatusResponse): # Make sure the status is OK if ( - rsp.input_device_error - or rsp.short_address_is_mask + rsp.short_address_is_mask or rsp.reset_state ): continue diff --git a/dali/tests/test_device_sequences.py b/dali/tests/test_device_sequences.py index d5456ca..910a8e1 100644 --- a/dali/tests/test_device_sequences.py +++ b/dali/tests/test_device_sequences.py @@ -77,7 +77,7 @@ class DeviceFakeError(fakes.Device): _device_status = 0b00000001 -def test_device_autodiscover_skip_bad(fakes_bus): +def test_device_autodiscover_dont_skip_bad(fakes_bus): dev_inst_map = DeviceInstanceTypeMapper() # Add an extra fake device, one with an error bit set fakes_bus.gear.append( @@ -90,8 +90,8 @@ def test_device_autodiscover_skip_bad(fakes_bus): assert rsp.input_device_error fakes_bus.run_sequence(dev_inst_map.autodiscover()) - # The device in error mode shouldn't have had its instances counted - assert len(dev_inst_map.mapping) == 12 + # The mere fact that a device has "inputDeviceError" set does not mean it is not usable + assert len(dev_inst_map.mapping) == 16 class DeviceNoInstances(fakes.Device):