'Get the latest data and update device state.'

@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):

    self._tv.update()
    self._min_volume = self._tv.min_volume
    self._max_volume = self._tv.max_volume
    self._volume = self._tv.volume
    self._muted = self._tv.muted
    if self._tv.source_id:
        src = self._tv.sources.get(self._tv.source_id, None)
        if src:
            self._source = src.get('name', None)
    if (self._tv.sources and (not self._source_list)):
        for srcid in sorted(self._tv.sources):
            srcname = self._tv.sources.get(srcid, dict()).get('name', None)
            self._source_list.append(srcname)
            self._source_mapping[srcname] = srcid
    if self._tv.on:
        self._state = STATE_ON
    else:
        self._state = STATE_OFF
    self._watching_tv = bool((self._tv.source_id == 'tv'))
    self._tv.getChannelId()
    self._tv.getChannels()
    if (self._tv.channels and (self._tv.channel_id in self._tv.channels)):
        self._channel_name = self._tv.channels[self._tv.channel_id]['name']
    else:
        self._channel_name = None
