def consumption(sensor_id):
    current_load = measurements.get_current_load(sensor_id)

    result = {
               'Sensor_id': sensor_id,
               'current_load': current_load,
               'current_load_unit': 'kWh'
             }

    return json.dumps(result)
def consumption(sensor_id):
    current_load = measurements.get_current_load(sensor_id)

    result = {
        'Sensor_id': sensor_id,
        'current_load': current_load,
        'current_load_unit': 'kWh'
    }

    return json.dumps(result)
def current_load_get(sensor_id):
    debug("currentLoadGet")
    current_load = measurements.get_current_load(sensor_id)

    result = {
               'sensorId': sensor_id,
               'currentLoad': current_load['sensor_value'],
               'sensorType': current_load['sensor_type'],
               'sensorUnit': current_load['sensor_unit']
             }

    print result
    return json.dumps(result)
def current_load_get(sensor_id):
    debug("currentLoadGet")
    current_load = measurements.get_current_load(sensor_id)

    result = {
        'sensorId': sensor_id,
        'currentLoad': current_load['sensor_value'],
        'sensorType': current_load['sensor_type'],
        'sensorUnit': current_load['sensor_unit']
    }

    print(result)
    return json.dumps(result)