'Initialize the sensor.'

def __init__(self, data, name, sensor_type, update_call):

    self._name = name
    self._data = data
    self._sensor_type = sensor_type
    self.update_sensor = update_call
    self._state = None
    if (sensor_type == ACTIVE_TYPE):
        self._unit_of_measurement = 'W'
    elif (sensor_type == DAILY_TYPE):
        self._unit_of_measurement = 'kWh'
