'Get the latest data from Yahoo! and updates the states.'

def update(self):

    self._data.update()
    if (not self._data.yahoo.RawData):
        _LOGGER.info("Don't    receive    weather    data    from    Yahoo!")
        return
    self._code = self._data.yahoo.Now['code']
    if (self._type == 'weather_current'):
        self._state = self._data.yahoo.Now['text']
    elif (self._type == 'weather'):
        self._code = self._data.yahoo.Forecast[self._forecast]['code']
        self._state = self._data.yahoo.Forecast[self._forecast]['text']
    elif (self._type == 'temperature'):
        self._state = self._data.yahoo.Now['temp']
    elif (self._type == 'temp_min'):
        self._code = self._data.yahoo.Forecast[self._forecast]['code']
        self._state = self._data.yahoo.Forecast[self._forecast]['low']
    elif (self._type == 'temp_max'):
        self._code = self._data.yahoo.Forecast[self._forecast]['code']
        self._state = self._data.yahoo.Forecast[self._forecast]['high']
    elif (self._type == 'wind_speed'):
        self._state = self._data.yahoo.Wind['speed']
    elif (self._type == 'humidity'):
        self._state = self._data.yahoo.Atmosphere['humidity']
    elif (self._type == 'pressure'):
        self._state = self._data.yahoo.Atmosphere['pressure']
    elif (self._type == 'visibility'):
        self._state = self._data.yahoo.Atmosphere['visibility']
