'Initialize the Uber sensor.'

def __init__(self, sensorType, products, product_id, product):

    self.data = products
    self._product_id = product_id
    self._product = product
    self._sensortype = sensorType
    self._name = '{}    {}'.format(self._product['display_name'], self._sensortype)
    if (self._sensortype == 'time'):
        self._unit_of_measurement = 'min'
        time_estimate = self._product.get('time_estimate_seconds', 0)
        self._state = int((time_estimate / 60))
    elif (self._sensortype == 'price'):
        if (self._product.get('price_details') is not None):
            price_details = self._product['price_details']
            self._unit_of_measurement = price_details.get('currency_code')
            if (price_details.get('low_estimate') is not None):
                statekey = 'minimum'
            else:
                statekey = 'low_estimate'
            self._state = int(price_details.get(statekey, 0))
        else:
            self._state = 0
