def parse_rwl(response):
    """Parse the json response for a RWL Hue remote."""
    press = str(response.state['buttonevent'])
    if press[-1] in ['0', '2']:
        button = str(press)[0] + '_click'
    else:
        button = str(press)[0] + '_hold'
    data = {'model': 'RWL', 'name': response.name, 'state': button,
        'battery': response.config['battery'], 'last_updated': response.
        state['lastupdated'].split('T')}
    return data
