'Return the state of the sensor.'

@property
def state(self):

    free = (float(self._api.data['system_stats']['memory']['free']) / 1024)
    if (self.var_id == 'memory_free'):
        return round_nicely(free)
    total = (float(self._api.data['system_stats']['memory']['total']) / 1024)
    used = (total - free)
    if (self.var_id == 'memory_used'):
        return round_nicely(used)
    if (self.var_id == 'memory_percent_used'):
        return round(((used / total) * 100))
