'Return the state of the sensor.'

@property
def state(self):

    if ((self._condition == 'visibility_distance') and ('visibility' in self.data.data.__dict__.keys())):
        return VISIBILTY_CLASSES.get(self.data.data.visibility.value)
    if (self._condition in self.data.data.__dict__.keys()):
        variable = getattr(self.data.data, self._condition)
        if (self._condition == 'weather'):
            return [k for (k, v) in CONDITION_CLASSES.items() if (self.data.data.weather.value in v)][0]
        return variable.value
    return STATE_UNKNOWN
