'Test with discovery of switch when auto add is False.'

def test_discover_switch_noautoadd(self):

    self.assertTrue(setup_component(self.hass, 'switch', {'switch': {'platform': 'rfxtrx', 'automatic_add': False, 'devices': {}}}))
    event = rfxtrx_core.get_rfx_object('0b1100100118cdea02010f70')
    event.data = bytearray([11, 17, 0, 16, 1, 24, 205, 234, 1, 1, 15, 112])
    rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
    self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
    self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
    rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
    self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
    event = rfxtrx_core.get_rfx_object('0b1100100118cdeb02010f70')
    event.data = bytearray([11, 17, 0, 18, 1, 24, 205, 234, 2, 0, 0, 112])
    rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
    self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
    event = rfxtrx_core.get_rfx_object('0a52085e070100b31b0279')
    event.data = bytearray('\nR\x08^\x07\x01\x00\xb3\x1b\x02y')
    rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
    self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
    event = rfxtrx_core.get_rfx_object('0b1100100118cdea02010f70')
    event.data = bytearray([11, 17, 17, 16, 1, 24, 205, 234, 1, 2, 15, 112])
    rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
    self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
    event = rfxtrx_core.get_rfx_object('0a1400adf394ab020e0060')
    event.data = bytearray([10, 20, 0, 173, 243, 148, 171, 2, 14, 0, 96])
    rfxtrx_core.RECEIVED_EVT_SUBSCRIBERS[0](event)
    self.assertEqual(0, len(rfxtrx_core.RFX_DEVICES))
