'Return the state attributes of the sensor.'

@property
def device_state_attributes(self):

    if (not self.is_binary):
        return {ATTR_MEAN: self.mean, ATTR_COUNT: self.count, ATTR_MAX_VALUE: self.max, ATTR_MEDIAN: self.median, ATTR_MIN_VALUE: self.min, ATTR_SAMPLING_SIZE: ('unlimited' if (self._sampling_size is 0) else self._sampling_size), ATTR_STANDARD_DEVIATION: self.stdev, ATTR_TOTAL: self.total, ATTR_VARIANCE: self.variance, ATTR_CHANGE: self.change, ATTR_AVERAGE_CHANGE: self.average_change}
