'Get the ComEd Hourly Pricing data from the web service.'

def update(self):

    try:
        if (self.type == CONF_FIVE_MINUTE):
            url_string = (_RESOURCE + '?type=5minutefeed')
            response = get(url_string, timeout=10)
            self._state = round((float(response.json()[0]['price']) + self.offset), 2)
        elif (self.type == CONF_CURRENT_HOUR_AVERAGE):
            url_string = (_RESOURCE + '?type=currenthouraverage')
            response = get(url_string, timeout=10)
            self._state = round((float(response.json()[0]['price']) + self.offset), 2)
        else:
            self._state = STATE_UNKNOWN
    except (RequestException, ValueError, KeyError):
        _LOGGER.warning('Could    not    update    status    for    %s', self.name)
