'Initialize the sensor.'

def __init__(self, sensor_type, app_token, utc_offset, period, currency, sid=None):

    self.sid = sid
    if sid:
        self._name = ('efergy_' + sid)
    else:
        self._name = SENSOR_TYPES[sensor_type][0]
    self.type = sensor_type
    self.app_token = app_token
    self.utc_offset = utc_offset
    self._state = None
    self.period = period
    self.currency = currency
    if (self.type == 'cost'):
        self._unit_of_measurement = ((self.currency + '/') + self.period)
    else:
        self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
