'Get the latest data from hydrodata.ch.'

@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):

    import xmltodict
    details = {}
    try:
        response = requests.get(_RESOURCE, timeout=5)
    except requests.exceptions.ConnectionError:
        _LOGGER.error('Unable    to    retrieve    data    from    %s', _RESOURCE)
    try:
        stations = xmltodict.parse(response.text)['AKT_Data']['MesPar']
        for station in stations:
            if (str(self.station) != station.get('@StrNr')):
                continue
            for data in ['02', '03', '10']:
                if (data != station.get('@Typ')):
                    continue
                values = station.get('Wert')
                if (values is not None):
                    details[data] = {'current': values[0], 'max': list(values[4].items())[1][1], 'mean': list(values[3].items())[1][1]}
                details['location'] = station.get('Name')
                details['update_time'] = station.get('Zeit')
        self.measurings = details
    except AttributeError:
        self.measurings = None
