@callback
def light_update(event, device_id):
    'Handle light updates from the RFXtrx gateway.'
    if (not supported(event)):
        return
    if (device_id in device_ids):
        return
    device_ids.add(device_id)
    _LOGGER.info('Added light (Device ID: %s Class: %s Sub: %s, Event: %s)', event.device.id_string.lower(), event.device.__class__.__name__, event.device.subtype, ''.join((f'{x:02x}' for x in event.data)))
    entity = RfxtrxLight(event.device, device_id, DEFAULT_SIGNAL_REPETITIONS, event=event)
    async_add_entities([entity])
Handle light updates from the RFXtrx gateway.
@callback
def light_update(event, device_id):
    
    if (not supported(event)):
        return
    if (device_id in device_ids):
        return
    device_ids.add(device_id)
    _LOGGER.info('Added light (Device ID: %s Class: %s Sub: %s, Event: %s)', event.device.id_string.lower(), event.device.__class__.__name__, event.device.subtype, .join((f'{x:02x}' for x in event.data)))
    entity = RfxtrxLight(event.device, device_id, DEFAULT_SIGNAL_REPETITIONS, event=event)
    async_add_entities([entity])