'Return the state of the sensor.'

@property
def state(self):

    if (self._type == CONF_TYPE_TIME):
        return round(self.value, 2)
    if (self._type == CONF_TYPE_RATIO):
        return HistoryStatsHelper.pretty_ratio(self.value, self._period)
    if (self._type == CONF_TYPE_COUNT):
        return self.count
