'Test with 1 light.'

def test_one_light(self):

    self.assertTrue(setup_component(self.hass, 'light', {'light': {'platform': 'rfxtrx', 'devices': {'0b1100cd0213c7f210010f51': {'name': 'Test'}}}}))
    import RFXtrx as rfxtrxmod
    rfxtrx_core.RFXOBJECT = rfxtrxmod.Core('', transport_protocol=rfxtrxmod.DummyTransport)
    self.assertEqual(1, len(rfxtrx_core.RFX_DEVICES))
    entity = rfxtrx_core.RFX_DEVICES['213c7f216']
    self.assertEqual('Test', entity.name)
    self.assertEqual('off', entity.state)
    self.assertTrue(entity.assumed_state)
    self.assertEqual(entity.signal_repetitions, 1)
    self.assertFalse(entity.should_fire_event)
    self.assertFalse(entity.should_poll)
    self.assertFalse(entity.is_on)
    entity.turn_on()
    self.assertTrue(entity.is_on)
    self.assertEqual(entity.brightness, 255)
    entity.turn_off()
    self.assertFalse(entity.is_on)
    self.assertEqual(entity.brightness, 0)
    entity.turn_on(brightness=100)
    self.assertTrue(entity.is_on)
    self.assertEqual(entity.brightness, 100)
    entity.turn_on(brightness=10)
    self.assertTrue(entity.is_on)
    self.assertEqual(entity.brightness, 10)
    entity.turn_on(brightness=255)
    self.assertTrue(entity.is_on)
    self.assertEqual(entity.brightness, 255)
    entity.turn_off()
    entity_id = rfxtrx_core.RFX_DEVICES['213c7f216'].entity_id
    entity_hass = self.hass.states.get(entity_id)
    self.assertEqual('Test', entity_hass.name)
    self.assertEqual('off', entity_hass.state)
    entity.turn_on()
    entity_hass = self.hass.states.get(entity_id)
    self.assertEqual('on', entity_hass.state)
    entity.turn_off()
    entity_hass = self.hass.states.get(entity_id)
    self.assertEqual('off', entity_hass.state)
    entity.turn_on(brightness=100)
    entity_hass = self.hass.states.get(entity_id)
    self.assertEqual('on', entity_hass.state)
    entity.turn_on(brightness=10)
    entity_hass = self.hass.states.get(entity_id)
    self.assertEqual('on', entity_hass.state)
    entity.turn_on(brightness=255)
    entity_hass = self.hass.states.get(entity_id)
    self.assertEqual('on', entity_hass.state)
