'Get the latest data from the source and updates the state.'

def update(self):

    self.rest.update()
    from bs4 import BeautifulSoup
    raw_data = BeautifulSoup(self.rest.data, 'html.parser')
    _LOGGER.debug(raw_data)
    value = raw_data.select(self._select)[0].text
    _LOGGER.debug(value)
    if (self._value_template is not None):
        self._state = self._value_template.render_with_possible_json_value(value, STATE_UNKNOWN)
    else:
        self._state = value
