'Get the latest data with a shell command.'

@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):

    _LOGGER.info('Rendering    where:    %s', self.where)
    try:
        where_clause = self.where.render()
    except TemplateError as ex:
        _LOGGER.error('Could    not    render    where    clause    template:    %s', ex)
        return
    self.query = 'select    {}({})    as    value    from    {}    where    {}'.format(self.group, self.field, self.measurement, where_clause)
    _LOGGER.info('Running    query:    %s', self.query)
    points = list(self.influx.query(self.query).get_points())
    if (not points):
        _LOGGER.warning('Query    returned    no    points,    sensor    state    set    to    UNKNOWN:    %s', self.query)
        self.value = None
    else:
        if (len(points) > 1):
            _LOGGER.warning('Query    returned    multiple    points,    only    first    one    shown:    %s', self.query)
        self.value = points[0].get('value')
