'Initialize the sensor.'

def __init__(self, sensor_type, offset, name):

    if name:
        self._name = name
    else:
        self._name = SENSOR_TYPES[sensor_type][0]
    self.type = sensor_type
    self.offset = offset
    self._state = None
    self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
